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
# Given files ~/dev.s3cfg and ~/prd.s3cfg | |
# $swap dev | |
# $swap prd | |
function swap { | |
echo "Setting aws key + secret for s3cmd and aws-cli to $1 ENV" | |
rm -f ~/.s3cfg | |
cp ~/$1.s3cfg ~/.s3cfg | |
rm -rf ~/.aws/ | |
cp -r ~/$1.aws ~/.aws/ | |
} |
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 | |
# This has two assumptions | |
# 1. Virtual environment set up in ~/venv/{project-name} | |
# 2. Configuration for configuration set up in ~/salt/{project-name} | |
# Given the name of the project as parameter | |
# $jwenv mini-batch | |
function project_name { | |
if [ -z $1 ]; | |
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
# Alias to list the 5 most recently edited git branches | |
alias gre="git for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:red)%(objectname:short)%(color:reset);%(color:yellow)%(refname:short)%(color:reset);(%(color:green)%(committerdate:relative)%(color:reset));%(authorname);%(contents:subject)' | column -t -s ';' | tail -5" | |
## Example output | |
# d1d3373 bugfix/graph-segments (3 days ago) Donato Borrello Parameterize graph_segments values | |
# d1d3373 task/ordering (3 days ago) Donato Borrello Parameterize graph_segments values | |
# 3138812 bugfix/group-validate (3 days ago) Donato Borrello Bugfix to validation for group in charts | |
# 4bda519 task/accuracy-checker (19 hours ago) Donato Borrello Add script to wrap accuracy checker |
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
/* | |
This is a simplified excerpt of a performance test used for channel throughput. | |
It reads from a file into an inputChannel, and pushes it's data through two other channels. | |
You can tune the test by how many bytes are sent at a time, and how long to wait between sending more data. | |
usage | |
$node channel-push-test.js my_video.mp4 | |
*/ |
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
function deleteBefore(days) { | |
var ONE_DAY = 1000 * 60 * 60 * 24; | |
$('.branch-summary:not(.is-deleted)').each(function () { | |
var $this = $(this); | |
var datetime = new Date($this.find('time').attr('datetime')).getTime(); | |
var today = (new Date().getTime()); | |
var filter = today - (ONE_DAY * days); |