Or: “Everybody likes being given a glass of water.”
By Merlin Mann.
It's only advice for you because it had to be advice for me.
Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');| <div class="datetime"> | |
| <span>Sept</span> | |
| <span>25</span> | |
| <span>11:30 <strong>AM</strong> <span></span></span> | |
| </div> |
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
| // converts milliseconds to '3:45' or if hours > 0, '2:01:23' | |
| var getTimeFromMillis = function( ms ) { | |
| var seconds = ~~( ( ms / 1000 ) % 60 ), | |
| minutes = ~~( ( ms / ( 1000 * 60 ) ) % 60 ), | |
| hours = ~~( ( ms / ( 1000 * 60 * 60 ) ) ), | |
| twoDigit = function ( n ) { | |
| return n < 10 ? '0' + n : n; | |
| }, | |
| seconds = ':' + twoDigit( seconds ); |
| <!DOCTYPE html> | |
| <!-- Helpful things to keep in your <head/> | |
| // Brian Blakely, 360i | |
| // http://twitter.com/brianblakely/ | |
| --> | |
| <head> | |
| <!-- Disable automatic DNS prefetching. | |
| #!/usr/bin/env python | |
| """ | |
| Like cut, but for CSVs. To be used from a shell command line. | |
| Note that fields are zero-based, as opposed to 'cut' where they are 1-based. | |
| Should use something better than getopt, but this works... | |
| Usage: | |
| csvcut foobar.csv |