Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am ejschmitt on github.
  • I am ejschmitt (https://keybase.io/ejschmitt) on keybase.
  • I have a public key ASD_iwAPEKDpjH0Pq4icAWGN5KplVPFHlhiHL2QrtoxQngo

To claim this, I am signing this object:

@ejschmitt
ejschmitt / gist:3790307
Created September 26, 2012 20:16
Install vim on heroku
cd /tmp && curl -O ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2 && bunzip2 -c vim-7.3.tar.bz2 | tar -xf - && cd vim73 && ./configure --prefix=/tmp && make install && echo PATH='$PATH:/tmp/bin/' > path && source path
copy this file to ~/.git-completion.sh
https://github.com/git/git/blob/master/contrib/completion/git-completion.bash
Add this to your .bashrc, or .profile, or whatever:
source ~/.git-completion.sh
#!/bin/bash
############################################################################
# Script to open a directory in TextMate excluding certain directories that
# tend to slow down the Find in Project... function.
#
# Place in an executable loctation with a name of your choosing.
# I use `mt'
# Original: http://www.wezm.net/technical/2009/05/exclude-directories-from-textmate-side-bar-for-faster-find-in-project/
############################################################################
var conditionalLoader = function (condition, execute) {
var interval = setInterval(function () {
if (condition()) {
clearInterval(interval);
execute();
}
}, 50);
};
def obtain_class
class_name = ENV['CLASS'] || ENV['class']
raise "Must specify CLASS" unless class_name
@klass = Object.const_get(class_name)
end
def obtain_attachments
name = ENV['ATTACHMENT'] || ENV['attachment']
raise "Class #{@klass.name} has no attachments specified" unless @klass.respond_to?(:attachment_definitions)
if !name.blank? && @klass.attachment_definitions.keys.include?(name)
# Something I have wanted to write for a while,
# takes text and converts to an image, very simple.
# Erick Schmitt - July 19, 2009
module ImageText
require 'rubygems'
require 'fileutils'
require 'RMagick'
include Magick
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/[\1]/'
}
export PS1='\[\033[0;32m\]\h\[\033[0;36m\] \w\[\033[0;33m\]$(parse_git_branch)\[\033[00m\]: '
# .irbrc
require 'rubygems'
begin
# load wirble
require 'wirble'
# start wirble (with color)
Wirble.init
Wirble.colorize
rescue LoadError => err
alias xclip='pbcopy'
alias c='xclip'
alias cdc='pwd | c'
alias p='pbpaste'
alias cdp='cd `p`'
alias clr='clear'
-------
alias c='xclip -selection c'