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
<div class="growl-container" amp-access="v = 2" amp-access-hide> | |
<amp-user-notification layout="nodisplay" id="amp-user-notification-growl-at-2" data-show-if-href="https://cdn1.nyt.com/amp/show-growl?_=TIMESTAMP" data-dismiss-href="https://cdn1.nyt.com/amp/dismiss-growl?_=TIMESTAMP"> | |
<section class="growl-main"> | |
<header class="growl-header"> | |
<a class="growl-dismiss" on="tap:amp-user-notification-growl-at-2.dismiss"> | |
<i class="growl-dismiss-icon"><span>close</span></i> | |
</a> | |
<h4 class="growl-headline"> | |
You have <strong>8</strong> free articles left this month | |
</h4> |
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
// logged from /2015/12/01/business/international/china-renminbi-reserve-currency.html?force_hbnobid=1 | |
var loggedDfpData = { | |
"creativeId": 82156847918, | |
"lineItemId": 47347838, | |
"elementId": "dfp-ad-top", | |
"targetingMap": { | |
"pos": ["top"] | |
} | |
}; |
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
region = 'bar' | |
foo = (data) -> | |
msg = 'I *really* hope all this junk exists.. ' | |
if data.regions?[region]?.modules?[0]?.modules? | |
msg = 'phew.. that was close!' | |
else | |
msg = 'we have an existential crisis!' | |
console.log msg |
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
#!/bin/sh | |
# | |
# Naive pre-commit hook to prevent committing new CoffeeScript files into a repo. | |
git diff --cached --name-status --diff-filter=A | while read st file; do | |
if [[ "$file" =~ ".coffee" ]] ; then | |
echo "No new CoffeeScript! Please rewrite $file as ES6+." | |
exit 1 | |
fi | |
done |
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
(?<!\")(\w)(?<!\")(\:) |
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
ffmpeg -i path/to/input.asf -strict -2 path/to/output.mp4 |
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
# your stuff | |
# ... | |
# ... | |
# source these git related commands | |
source ~/.git_completion.sh | |
source ~/.git_prompt.sh | |
source ~/.git_prompt_colors.sh | |
# more of your stuff |
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
# -q 5 sets the desired quality. | |
ffmpeg -i input.mp4 -q 5 -pix_fmt yuv420p -acodec libvorbis -vcodec libtheora output.ogv |
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
ffmpeg -i input.mp4 -c:v libvpx -crf 10 -b:v 1M -c:a libvorbis output.webm |
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
var onsiteVotesByAthlete = {}; | |
votes.forEach(function (vote){ | |
if ( vote.athlete._id in onsiteVotesByAthlete ){ | |
onsiteVotesByAthlete[vote.athlete._id] += 1; | |
} else { | |
onsiteVotesByAthlete[vote.athlete._id] = 1; | |
} | |
}); |