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
// Thanks to @isntitvacant (https://github.com/chrisdickinson) for optimizing the | |
// bit shift performance tweaks. | |
var SB = require('buffer').SlowBuffer; | |
var ITER = 2e4; | |
var SIZE = 1e3; | |
function genPrimes(max) { | |
var primes = new Array(); | |
var len = (max >>> 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
#!/bin/bash | |
# Usage: | |
# sudo ./install-iojs-nightly.sh | |
# or for next-nightly: | |
# sudo ./install-iojs-nightly.sh next | |
type=nightly | |
if [ "X$1" == "Xnext" ]; then | |
type=next-nightly |
I hereby claim:
- I am nickleefly on github.
- I am nickleefly (https://keybase.io/nickleefly) on keybase.
- I have a public key whose fingerprint is 0AFD 9D6A F5D9 9F70 5E95 913B B28E 7EC0 B478 99EB
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
# brew list | |
brew install bash-completion | |
brew install nodejs | |
brew install wget | |
brew install unicodechecker | |
brew install ipv6toolkit | |
brew install ack | |
brew install the_silver_searcher | |
brew install wifi-password | |
brew install tmux |
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
strict_chain | |
proxy_dns | |
remote_dns_subnet 224 | |
tcp_read_time_out 15000 | |
tcp_connect_time_out 8000 | |
localnet 127.0.0.0/255.0.0.0 | |
quiet_mode | |
[ProxyList] | |
socks5 127.0.0.1 1080 |
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
gifify() { | |
if [[ -n "$1" ]]; then | |
if [[ $2 == '--good' ]]; then | |
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png | |
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif | |
rm out-static*.png | |
else | |
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif | |
fi | |
else |
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 mkdirp = require('mkdirp') | |
var path = require('path') | |
var HOME = process.env.HOME | |
var dir = path.join(HOME, 'dprk.db') | |
mkdirp.sync(dir) | |
var db = require('levelup')(dir, {encoding: 'json'}) | |
db.put( | |
'dprk' | |
, { |
git branch -vv --color=always | while read; do echo -e $(git log -1 --format=%ci $(echo "_$REPLY" | awk '{print $2}' | perl -pe 's/\e\[?.*?[\@-~]//g') 2> /dev/null || git log -1 --format=%ci)" $REPLY"; done | sort -r | cut -d ' ' -f -1,4-
git for-each-ref --format='%(committerdate:iso8601) %(committerdate:relative) %(refname)' --sort -committerdate
git for-each-ref --format='%(committerdate:iso8601) %(committerdate:relative) %(refname)' --sort -committerdate refs/heads/
git for-each-ref --format='%(committerdate:short),%(authorname),%(refname:short)' --sort=committerdate refs/heads/ | column -t -s ','
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r
for branch in `git branch -l | grep -v '*'`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r