- reclaim simple synchronous control flow like return & throw
- easier to write and maintain
- banish callback hell
// Convert a Gmail datetime into an ISODate for Mongo | |
function gmailToIso(string) { | |
return 'ISODate("' + new Date(string.split('at ').join('')).toISOString() + '")' | |
} |
https://www.youtube.com/watch?v=U3_VUWWh7iw
- white indents are the ones I wasn't with him for
- Miami
- Dallas
- Somewhere near Portland (Oregon)
- Campbell Falls (Massachusetts)
- Chicago
- Glacier National Park (Montana)
- Thermopiles (Wyoming)
Fun things in San Francisco
A friend was visiting town so we were coming up with some of the best things to show him in San Francisco. These are some of my favorites:
- Palace of Fine Arts
- Walking around civic center / downtown / Financial District
- Cable cars
- Ocean Beach
- Sutro Baths & Lands End
- exploring Golden Gate Park
Longer Hack Reactor Lecture ideas:
- Famous problems in computer science
- how to send encrypted messages
- passwords are obsolete
- important events in the history of open-source
- the earliest computers
- why do people care about bitcoin?
- Gödel's Incompleteness Theorem
- most common biases that confuse our thinking
/* | |
* Your Stylesheet | |
* | |
* This stylesheet is loaded when Atom starts up and is reloaded automatically | |
* when it is changed and saved. | |
* | |
* Add your own CSS or Less to fully customize Atom. | |
* If you are unfamiliar with Less, you can read more about it here: | |
* http://lesscss.org | |
*/ |
/* eslint-env node */ | |
module['exports'] = function echoHttp (hook) { | |
console.log('hook.req', hook.req.method) | |
// console.log('hook.params', hook.params['attachment-1']['body-plain']) | |
console.log('hook.params', hook.params) | |
if (hook.req.method === 'POST') { | |
console.log('in POST request') | |
} |
echo $(docker-machine ip default) dockerhost | sudo tee -a /etc/hosts |
# Add this to the top of your .bash_profile | |
git () { | |
say "git"; | |
/usr/local/bin/git "$@"; | |
} |
Tested with the looping going up to n <= 65
node-simplelogger: 12.2s (with slight delay after it finished printing before the process ended)
no logging: 10.6s
console.log: 12.8s
These measurements came from adjust line 33 of this file: https://github.com/dsernst/ProjectEuler/blob/67a9c17f0810ff6a5da5c20c027e8c11c7a0c304/53%20Combinatoric%20selections.js#L33
The point of these tests were to see if using an asyncronous logger would be faster than node's built in console
. In this case, it did not make a meaningful difference.