I hereby claim:
- I am jasoncust on github.
- I am jasoncust (https://keybase.io/jasoncust) on keybase.
- I have a public key whose fingerprint is F68A C9EB 2D17 7F4D 684F 6BD8 FB33 77BC 278E 81B5
To claim this, I am signing this object:
| function clone(object) { | |
| switch (getObjectType(object)){ | |
| case 'Object': | |
| object = Object.keys(object).reduce(function(obj, key) { | |
| obj[key] = clone(object[key]); | |
| return obj; | |
| }, {}); | |
| break; | |
| case 'Array': |
| function log(req, res, next) { | |
| var start = process.hrtime(); | |
| var write = res.write; | |
| var end = res.end; | |
| var chunks = []; | |
| res.write = function newWrite(chunk) { | |
| chunks.push(chunk); | |
| write.apply(res, arguments); |
| var Person = { | |
| first: undefined, | |
| last: undefined, | |
| personMethod: function personMethod() { | |
| console.log( this.first, this.last); | |
| } | |
| }; | |
| var Employee = Object.create(Person); | |
| Employee.position = undefined; |
| [alias] | |
| # Sample uses (defaults for Tues-Sat: from "yesterday AM" to "now", for Sun-Mon: from "last friday AM" to "now"): | |
| # $ git standup | |
| # $ git standup "last week" | |
| # $ git standup "3 days ago" | |
| # $ git standup "last monday" "last friday" | |
| # $ git standup --stat | |
| # $ git standup "last thursday AM" "last thursday PM" --pretty --date=short | |
| # For date formats: https://github.com/git/git/blob/master/date.c | |
| standup = "!f() { : git log ; \ |
| #!/usr/bin/env bash | |
| # MIT © Sindre Sorhus - sindresorhus.com | |
| # git hook to run a command after `git pull` if a specified file was changed | |
| # Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`. | |
| changed_files=$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD) | |
| check_run() { | |
| echo "${changed_files}" | grep --quiet "$1" && eval "$2" |
I hereby claim:
To claim this, I am signing this object:
| /* ES5 equivalent | |
| var obj = { one: 1, two: 2, three: 3 }; | |
| var one = obj.one; | |
| var two = obj.two; | |
| */ | |
| let obj = { one: 1, two: 2, three: 3 }; | |
| let {one, two} = obj; // <-- Destructuring Assignment | |
| console.log({one, two}); // output: { one: 1, two: 2 } |
| /* ES5 equivalent | |
| var arr = [1, 2, 3]; | |
| var one = arr[0]; | |
| var two = arr[1]; | |
| */ | |
| let arr = [1, 2, 3]; | |
| let [one, , three] = arr; // <-- Destructuring Assignment | |
| console.log({one, three}); // output: { one: 1, three: 3 } |
| /* ES5 equivalent (ignoring assignment of intended falsy values) | |
| var arr = []; | |
| var one = arr[0] || 1; | |
| var two = arr[1]; | |
| */ | |
| let arr = []; | |
| let [one = 1, two] = arr; | |
| console.log({one, two}); // output: { one: 1, two: undefined } |
| /* ES5 equivalent (ignoring assignment of intended falsy values) | |
| function foo(one, two) { | |
| one = one || 1; | |
| console.log({one, two}); | |
| } | |
| */ | |
| function foo(one = 1, two) { | |
| console.log({one, two}); | |
| } |