Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env ruby -w
require 'redis'
require 'benchmark'
HOST = 'localhost'
PORT = 6379
SETNAME = 'benchmark_testing_set'
SETSIZE = 3000
def prep(array=[])
#!/usr/bin/env ruby -w
require 'redis'
require 'benchmark'
HOST = 'localhost'
PORT = 6379
SETNAME = 'benchmark_testing_set'
SETSIZE = 7500
def prep(array)
# ~/.gitconfig
[user]
email = [email protected]
name = username
editor = mate -w
[color]
diff = auto
status = auto
branch = auto
[alias]
# Use Ack to find offending source files and Perl to perform the following:
# convert Windows newlines to unix newlines
# convert tabs to two spaces
# strip trailing whitespace
ack " +$|\t|\r" -l|xargs perl -pi -e "s/\r\n?/\n/g;s/\t/ /g;s/[ ]*$//g"
# Implement a clean() method in Bash:
# Clean up source code by converting tabs to 2 spaces, Windows newlines to
# unix ones, and by stripping away trailing whitespace. Pass in a list of