Skip to content

Instantly share code, notes, and snippets.

@maxim
maxim / tm2iterm.rb
Created June 10, 2012 04:04
Convert TextMate themes into iTerm 2 color schemes.
#!/usr/bin/env ruby
#
# This script is an astonishing feat of top notch
# rockstar craftsmanship. It totally uses artificial
# intelligence to extract colors out of tmTheme and
# build an itermcolors scheme file for iTerm2.
#
# I know this sounds crazy, but it actually knows
# approximately what colors should be used in the
# ANSI list, and tries to find nearest colors from
@mrmurphy
mrmurphy / shallow.js
Created June 6, 2012 20:03
Shallow water implementation (Requires three.js)
/* Author: Murphy Randle
Just a very simple shallow water simulation.
Heavily helped by code from: Paul Lewis: http://aerotwist.com/
*/
var cam, scene, renderer, geo, mesh, mat, projector, grid;
// Params to change simulation:
var gridWidth = 65;
var gridRes = 58;
@evansd
evansd / gist:1639992
Created January 19, 2012 13:09
Global find and replace using ack
function substitute {
if [ -z "$1" -o -z "$2" ]; then
echo "Usage: substitue FROM_STRING TO_STRING [OPTION]..."
echo
echo "Replace all occurances of FROM_STRING (a sed-compatible regular"
echo "expression) with TO_STRING in all files for which ack-grep matches"
echo "FROM_STRING."
echo
echo "Any additional options are passed directly to ack-grep (e.g.,"
echo " --type=html would only run the substitution on html files)."
@connor
connor / .jshintrc.js
Created January 11, 2012 22:20
jshintrc example
// NOTE: I added the .js extension to this gist so it would have syntax highlighting. This file should have NO file extension
{
// Settings
"passfail" : false, // Stop on first error.
"maxerr" : 100, // Maximum error before stopping.
// Predefined globals whom JSHint will ignore.
"browser" : true, // Standard browser globals e.g. `window`, `document`.