A stream consumption tool.
Status: Vaporware
In 2015, stream-processing is the it-girl of software architecture. This sub-field is driven forward by a growing number of
[alias] | |
crunk = checkout -b regrettable-late-night-coding-session |
// Java. | |
int sum = 0; | |
for (int i = 0; i < arr.length; i++) { | |
sum += arr[i]; | |
} | |
System.out.println(sum); | |
// Scala (ignoring arr.sum). | |
println(arr reduceLeft { _ + _ }) |
Programming, when stripped of all the circumstantial irrelevancies | |
is nothing more and nothing less than "very effective thinking | |
so as to avoid unmastered complexity, to very vigorous | |
separation of your many different concerns". | |
-- Edsger Dijkstra |
var Log = require('log'), | |
log = new Log('info'), | |
DropboxClient = require('dropbox').DropboxClient, | |
dropbox = new DropboxClient("api_key", "api_secret", | |
"access_token", "access_token_secret"); | |
/** | |
* Returns a function that checks the mtime of all files within dir | |
* and deletes any that are older than ttl. | |
*/ | |
function checkForAndRmExpiredItems(dir, ttl) { |
#!/usr/bin/env ruby | |
# giftube – Generates an animated gif from a YouTube url. | |
# | |
# Usage: | |
# | |
# giftube [youtube url] [minute:second] [duration] | |
# | |
# ex. | |
# |
Slides: http://www.sei.cmu.edu/community/td2013/program/upload/TechnicalDebt-ICSE.pdf
Business vs Technical viewpoints
Short- vs Long-term debt
#! /bin/sh | |
# A Git maintenance script. | |
set -e | |
root=`git rev-parse --show-toplevel` | |
echo "Performing maintenance tasks on Git repository in ${root}..." | |
git fetch | |
git remote prune origin | |
git repack -a -d --depth=250 --window=250 |
#!/usr/bin/env ruby | |
# | |
# Run tests for all projects that have been modified in the Birdcage, | |
# relative to HEAD. | |
# | |
# For example, if you've edited files in three projects, this script will | |
# run tests serially for these three projects in one command. | |
print "Determining which files have been changed..." | |
$stdout.flush |
#! /bin/sh | |
# A fuzzy `git checkout`. | |
match=`git rev-parse --abbrev-ref --branches="*$1*"` | |
case `wc -w <<< "$match" | tr -d ' '` in | |
"0") echo "error: '$1' did not match any branch." 2>&1 ;; | |
"1") git checkout $match ;; | |
*) echo "error: '$1' is ambigious among:\n$match" 2>&1 | |
esac |