As configured in my dotfiles.
start new:
tmux
start new with session name:
" Port of my favorite theme Made of Code by Mark Dodwell | |
" For Textmate Theme visit - http://madeofcode.com/posts/29-photo-my-new-textmate-theme-8220-made-of-code-8221-mdash-download-9-feb-2010-update-t | |
" Vim color file | |
set background=dark | |
highlight clear | |
if exists("syntax_on") | |
syntax reset |
# openFrameworks OS X makefile | |
# | |
# make help : shows this message | |
# make Debug: makes the application with debug symbols | |
# make Release: makes the app with optimizations | |
# make: the same as make Release | |
# make CleanDebug: cleans the Debug target | |
# make CleanRelease: cleans the Release target | |
# make clean: cleans everything | |
# |
# Used as a drop-in replacement for grep that colors matching lines, but prints all lines | |
function highlight() { | |
local args=( "$@" ) | |
for (( i=0; i<${#args[@]}; i++ )); do | |
if [ "${args[$i]:0:1}" != "-" ]; then | |
args[$i]="(${args[$i]})|$" | |
break | |
fi | |
done | |
grep --color -E "${args[@]}" |
#!/usr/bin/python -tt | |
import sys | |
def rule1(s): | |
if s[-1:] == 'i': | |
return [s + 'u'] | |
return [s] | |
def rule2(s): |
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible). | |
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export. | |
var FORMAT_ONELINE = 'One-line'; | |
var FORMAT_MULTILINE = 'Multi-line'; | |
var FORMAT_PRETTY = 'Pretty'; | |
var LANGUAGE_JS = 'JavaScript'; | |
var LANGUAGE_PYTHON = 'Python'; |
As configured in my dotfiles.
start new:
tmux
start new with session name:
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
/* See: http://0x10c.com/doc/dcpu-16.txt */ | |
function hex(n) { | |
return '0x' + n.toString(16); | |
} | |
function disassemble (code) { | |
var PC = 0; | |
var operand = function (bits) { |
#!/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 |
<?php | |
/* | |
Plugin Name: Pug Bomb API Endpoint | |
Description: Adds an API endpoint at /api/pugs/$n_pugs | |
Version: 0.1 | |
Author: Brian Fegter | |
Author URL: http://coderrr.com | |
*/ | |
class Pugs_API_Endpoint{ |