This file contains 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
""" | |
Helper to Pickle objects with bz2 compression | |
""" | |
import bz2, pickle, os.path | |
def save_object(filename, data_object): | |
print('saving object "' + filename + '"') | |
save_file = bz2.BZ2File(filename, 'w') | |
pickle.dump(data_object, save_file) |
This file contains 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
{ | |
"Use Non-ASCII Font" : false, | |
"Tags" : [ | |
], | |
"Ansi 12 Color" : { | |
"Green Component" : 0.6151015758514404, | |
"Blue Component" : 0.9642278552055359, | |
"Red Component" : 0.3451849222183228 | |
}, |
This file contains 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
{ | |
"extends": [ | |
"eslint:recommended", | |
"plugin:react/recommended", | |
], | |
"env": { | |
"es6": true, | |
"browser": true, | |
"node": true, | |
}, |
This file contains 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
#!/usr/bin/env bash | |
netstat -nat | awk '{print $6}' | sort | uniq -c | sort -n |
This file contains 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
#!/usr/bin/env bash | |
containerName=''; | |
truncateDockerLog(){ | |
truncate -s 0 $(docker inspect $containerName | grep log | awk '{print $2}' | cut -d\" -f2) | |
} | |
# pass no args and truncate all | |
# pass a container name and truncate that container |
This file contains 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 | |
grep -R console.log --exclude-dir node_modules --exclude-dir .git --exclude *.md . |
This file contains 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
#!/usr/bin/env bash | |
#load vim session | |
session=$1 | |
loadVimSession() { | |
echo | |
vim -S $HOME/.vim/sessions/$session | |
} | |
findVimSession() { | |
session=`ls ~/.vim/sessions | sed "${1}q;d"` | |
if [ -z "$session" ]; then |
This file contains 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
'use strict'; | |
let v8 = require('v8'); | |
let start = Date.now(); | |
let fieldMap = {}; | |
let amount = 2E5; | |
let cycles = 4; | |
for (let c = 0; c < cycles; c++) { | |
fieldMap['a_'+c] = 'a'+c; | |
fieldMap['b_'+c] = 'b_'+c; | |
fieldMap['c_'+c] = 'c'+c; |
This file contains 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
'use strict'; | |
let v8 = require('v8'); | |
let start = Date.now(); | |
let fieldMap = {}; | |
let amount = 2E5; | |
let cycles = 4; | |
for (let c = 0; c < cycles; c++) { | |
fieldMap['a_'+c] = 'a'+c; | |
fieldMap['b_'+c] = 'b_'+c; | |
fieldMap['c_'+c] = 'c'+c; |
This file contains 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
#!/usr/bin/env bash | |
currentBranch="`git branch | while read line; do if [[ "$line" =~ ^\* ]]; then echo ${line:2}; fi; done`" | |
if [ -d docs ]; then | |
rm -rf docs | |
fi | |
./node_modules/.bin/jsdoc -c jsdoc.json | |
git stash | |
git checkout gh-pages | |
mv -f ./docs/*.html . | |
rm -rf docs |
NewerOlder