This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| VAN=`egrep -i "^...$" /usr/share/dict/words | perl -MList::Util=shuffle -e "print shuffle<STDIN>" | head -n 1 | tr "[:lower:]" "[:upper:]"` && \ | |
| LETTER=${VAN:1:1} && \ | |
| EAST=`egrep -i "^.${LETTER}..$" /usr/share/dict/words | perl -MList::Util=shuffle -e "print shuffle<STDIN>" | head -n 1 | tr "[:lower:]" "[:upper:]"` && \ | |
| echo " ${EAST:0:1}" && \ | |
| echo $VAN && \ | |
| echo " ${EAST:2:1}" && \ | |
| echo " ${EAST:3:1}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| I always forget I'm signed in with my personal GMail account, and want | |
| to access our businesses Google Analytics, so here's what happens: | |
| 1. Load up http://www.google.com/analytics/ | |
| 2. Click 'Access Google Analytics' | |
| 3. Woops, wrong account. Click 'Sign out' | |
| 4. Choose business account | |
| 5. Enter password | |
| 6. Takes me to 'Personal Info - Account Settings' | |
| 7. Load up http://www.google.com/analytics/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Handy commands for setting everything up: | |
| * | |
| * Get Particle access token: | |
| * $ curl https://api.particle.io/oauth/token -u particle:particle -d grant_type=password -d username={Your Particle email address} -d password={Your Particle password} | |
| * | |
| * Get list of devices from Particle: | |
| * $ curl "https://api.particle.io/v1/devices?access_token={Your Particle access token}" | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ### Keybase proof | |
| I hereby claim: | |
| * I am tylor on github. | |
| * I am tylorsherman (https://keybase.io/tylorsherman) on keybase. | |
| * I have a public key ASCzt3oU8N8wUbRji-ONxVuvuHS0Ox2x48oqm5kNnnOSAwo | |
| To claim this, I am signing this object: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Port of Rails word_wrap(): https://github.com/rails/rails/blob/master/actionview/lib/action_view/helpers/text_helper.rb#L260 | |
| // rstrip using: https://stackoverflow.com/a/1418059 | |
| const word_wrap = (text, line_width, break_sequence) => { | |
| line_width = line_width || 80 | |
| break_sequence = break_sequence || "\n" | |
| return text.split("\n").map((line) => { | |
| return line.length > line_width ? line.replace(new RegExp(`(.{1,${line_width}})(\\s+|$)`, 'gm'), `$1${break_sequence}`).replace(/^\s+|\s+$/g, '') : line | |
| }).join("\n") | |
| } |
OlderNewer