This article is now published on my website: Prefer Subshells for Context.
| // Popcorn Instance Methods | |
| var p = Popcorn( "#video" ) | |
| p.play() | |
| // Play the video (Native "pass through" method) | |
| // Returns the Popcorn instance object | |
| p.load() | |
| // Load the video (Native "pass through" method) | |
| // Returns the Popcorn instance object |
| 1. Two space soft indents (fake tabs) OR tabs... BUT NEVER BOTH - DO NOT MIX | |
| 2. Whitespace, Parens, Braces, Linebreaks | |
| if/else/for/while/try always have spaces, braces and multiple lines. | |
| -------------------------------------------------------------------- | |
Simple vim setup with some essential plugins
- pathogen - https://github.com/tpope/vim-pathogen
- taglist.vim - http://www.vim.org/scripts/script.php?script_id=273
- NERD Tree - http://www.vim.org/scripts/script.php?script_id=1658
- fugitive.vim -- http://www.vim.org/scripts/script.php?script_id=2975
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
| #!/bin/bash | |
| # bash generate random alphanumeric string | |
| # | |
| # bash generate random 32 character alphanumeric string (upper and lowercase) and | |
| NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
| # bash generate random 32 character alphanumeric string (lowercase only) | |
| cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1 |
Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)
First one found from of
This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.
While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.
| default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam' | |
| default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes' | |
| default['sshd']['sshd_config']['PasswordAuthentication'] = 'no' |
This week NN Group released a video by Jakob Nielsen in which he attempts to help designers deal with the problem of customers being resistant to their new site/product redesign. The argument goes thusly:
- Humans naturally resist change
- Your change is for the better
- Customers should just get used to it and stop complaining
There's slightly more to it than that, he caveats his argument with requiring you to have of course followed their best practices on product design, and allows for a period of customers being able to elect to continue to use the old site, although he says this is obviously only a temporary solution as you don't want to support both.