Skip to content

Instantly share code, notes, and snippets.

View pixelhandler's full-sized avatar
🍊
Working remotely

Bill Heaton pixelhandler

🍊
Working remotely
View GitHub Profile
@guybrush
guybrush / nodeconf_2011.md
Created May 6, 2011 07:22
a list of slides from nodeconf 2011
@alexyoung
alexyoung / deploy.sh
Created May 17, 2011 10:47
Deployment script
#!/usr/bin/env bash
# Configuration
SERVER='myserver'
DEPLOY_TO='/path/to/app'
EXCLUDE='*.swp .git/ db/sphinx/ tmp/ log/'
DRY_RUN=false
DEPLOY_GEM_PATH='/opt/ec/ruby/1.8.7/lib/ruby/gems/1.8'
@joshmvandercom
joshmvandercom / madeofcode.vim
Created August 31, 2011 16:59
Port of Made of Code Theme to VIM
" 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
(function($) {
// Used by dateinput
$.expr = {':': {}};
// Used by bootstrap
$.support = {};
// Used by dateinput
$.fn.clone = function(){
var ret = $();
@jimbojsb
jimbojsb / gist:1630790
Created January 18, 2012 03:52
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

@digitaljhelms
digitaljhelms / gist:3014302
Created June 28, 2012 22:08
Sublime Text 2 bash alias & CLI function to open projects without using the `.sublime-project` file extension
# bash alias
alias subl='/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl'
# bash function, usage: $ st -p [projectname] -opt2 -opt3
function st() {
if [ -n "$1" -a -n "$2" ]; then # if more than one argument
if [ "$1" = "-p" -o "$1" = "--project" ]; then # if arg1 is -p or --project
local projectfile="$2"
[[ $projectfile != *.sublime-project ]] && projectfile="$2.sublime-project" # detect if arg2 already includes the ext
if [ -e $projectfile ]; then # does project file exist?
@avit
avit / mailer.rb
Created August 25, 2012 13:35
inheritable_copy error
class MyMailer < ActionMailer::Base
def notice(user)
# ...
mail(to: @to, from: @from, subject: @subject) do |format|
format.html { render text: @html_content }
format.text { render text: @text_content }
end
end
end
@dcosson
dcosson / gist:3686437
Created September 9, 2012 18:52
Compile Vim on OSX (Mountain Lion)
# default vim on osx doesn't have python, ruby support or clipboard support. These configure options add all that
# I also ran into problems using rvm ruby, had to include those libs in the LDFLAGS for vim
# Steps:
$ rvm install 1.9.1
$ rvm use 1.9.1 # vim doesn't support anything higher
$ curl ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2 | tar xj
$ cd vim73
$ ./configure --with-features=huge --enable-perlinterp=yes --enable-rubyinterp=yes --enable-pythoninterp=yes --enable-multibyte
@warlley
warlley / gist:3788319
Created September 26, 2012 14:17
show branch on shell
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
function proml {
local RED="\[\033[0;31m\]"
local LIGHT_RED="\[\033[1;31m\]"
local YELLOW="\[\033[0;33m\]"
local LIGHT_GREEN="\[\033[1;32m\]"
local WHITE="\[\033[1;37m\]"
@intel352
intel352 / Capfile
Last active December 13, 2015 20:28
A Capistrano capfile with support for running commands locally. Additionally has a variety of helper commands for various tasks.
require 'open3'
$CR = "\033[0m" # color reset
$red = "\033[1m\033[31m"
$green = "\033[1m\033[32m"
$yellow = "\033[1m\033[33m"
$blue = "\033[1m\033[34m"
ssh_options[:forward_agent] = true
ssh_options[:paranoid] = false