hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000064,"HIDKeyboardModifierMappingDst":0x700000035},{"HIDKeyboardModifierMappingSrc":0x700000035,"HIDKeyboardModifierMappingDst":0x700000064}]}'
# Put this function to your .bashrc file. | |
# Usage: mv oldfilename | |
# If you call mv without the second parameter it will prompt you to edit the filename on command line. | |
# Original mv is called when it's called with more than one argument. | |
# It's useful when you want to change just a few letters in a long name. | |
# | |
# Also see: | |
# - imv from renameutils | |
# - Ctrl-W Ctrl-Y Ctrl-Y (cut last word, paste, paste) |
Install packages
yarn add eslint prettier eslint-{config,plugin}-prettier eslint-plugin-react --dev --exact
package.json
{
"scripts": {
// No Security | |
{ | |
"rules": { | |
".read": true, | |
".write": true | |
} | |
} |
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:9000)" != "200" ]]; do sleep 5; done' | |
# also check https://gist.github.com/rgl/c2ba64b7e2a5a04d1eb65983995dce76 |
// connect() is a function that injects Redux-related props into your component. | |
// You can inject data and callbacks that change that data by dispatching actions. | |
function connect(mapStateToProps, mapDispatchToProps) { | |
// It lets us inject component as the last step so people can use it as a decorator. | |
// Generally you don't need to worry about it. | |
return function (WrappedComponent) { | |
// It returns a component | |
return class extends React.Component { | |
render() { | |
return ( |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
When connecting to a remote server via SSH it is often convenient to use SSH agent forwarding so that you don't need a separate keypair on that server for connecting to further servers.
This is enabled by adding the
ForwardAgent yes
option to any of your Host
entries in ~/.ssh/config
(or alternatively with the -A
option). Don't set this option in a wildcard Host *
section since any user on the remote server that can bypass file permissions can now als use keys loaded in your SSH agent. So only use this with hosts you trust.
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs