I hereby claim:
- I am rosston on github.
- I am rosston (https://keybase.io/rosston) on keybase.
- I have a public key ASAEF2nOt-GgXLEHrk4xLCGATKkz9wRbFbtuH6pdp-2A-Qo
To claim this, I am signing this object:
// Simple, single run | |
(function() {var body = angular.element('body'); var start = Date.now(); body.scope().$apply(); console.log((Date.now() - start) + 'ms digest');})(); | |
// Average of 50 | |
(function() { var body = angular.element('body'); var numRuns = 50; var totalRunTime = 0; for (var i = 0; i < numRuns; i++) { var start = Date.now(); body.scope().$apply(); totalRunTime += Date.now() - start; } console.log((totalRunTime / numRuns) + 'ms average over ' + numRuns + ' digests'); })(); |
'use strict'; | |
// | |
// Usage: | |
// jscodeshift -t find-lodash-method.js /path/to/dir/or/file --method-name=<lodash_method> [--min-args=<min_num_args>] [--chain-only=1] | |
// | |
// Prints all locations of matching uses of the lodash method (e.g., `map`). | |
// | |
// Function copied from https://github.com/jfmengels/lodash-codemods/blob/v1.0.1/lib/method-calls-conditional-name-changes.js#L163-L179 |
#!/bin/bash | |
set -e | |
USAGE=$(cat <<"EOF" | |
Usage: | |
git-cherry-pick-merge <destination_branch> <merge_commit_ref> | |
git-cherry-pick-merge --continue | |
Cherry-pick a merge commit (and its ancestors from the merged branch) onto |
*.ip | |
*.log |
/* | |
* Doubly-nested timeout ensures we run after browser render. (Sometimes needs | |
* to be triply-nested timeout in IE/Edge, for reasons unknown to me.) | |
* Explanation below. | |
* | |
* 1. $watch runs, sets up $timeout to be run later (see NOTE below) | |
* 2. $watch finishes (i.e., Angular has finished manipulating the DOM) | |
* 3. First $timeout runs, sets up $timeout to be run later (see NOTE below) | |
* 4. Browser renders | |
* 5. Second $timeout runs! |
/* | |
Below is one of my favorite timing functions. | |
It closely mimics jQuery's swing function. | |
*/ | |
* { | |
transition: 0.25s transform cubic-bezier(.02, .01, .47, 1); | |
} |
sudo nginx -t -c /etc/nginx/nginx.conf |
#!/bin/bash | |
path="/path/to/some.special.png" | |
filename=${path%.*} | |
jpg=$filename.jpg | |
echo "$jpg" |
I hereby claim:
To claim this, I am signing this object:
say_command=$1 | |
if [ -z "$say_command" ]; then | |
say_command="say" | |
fi | |
$say_command " | |
It's, supercalifragilisticexpialidocious | |
Even though the sound of it is something quite atrocious | |
If you say it loud enough, you'll always sound precocious | |
Supercalifragilisticexpialidocious |