Skip to content

Instantly share code, notes, and snippets.

@jondkinney
jondkinney / gist:828864
Created February 16, 2011 04:22
PreSonus UC Cleanup
on run {input, parameters}
-- Setup the list of the main files to be deleted
set searchList to {¬
POSIX file ("/Applications/Universal Control.app") as text, ¬
POSIX file ("/Applications/FireStudio Control Console.app") as text, ¬
POSIX file ("/Applications/FireControl.app") as text, ¬
POSIX file ("/Applications/FireStudio Lightpipe Mixer.app") as text, ¬
POSIX file ("/Applications/StudioLive.app") as text, ¬
POSIX file ("/Library/Application Support/PaeFireStudio") as text, ¬
@unicornrainbow
unicornrainbow / remove_project_trailing_whitespace.sh
Created January 27, 2011 16:17
A shell function to auto remove whitespace from an entire rails project in one shot.
remove_project_trailing_whitespace () {
for file in * (app|config|test|lib|public)/**/*.(rb|js|sass|css|yml|md|txt|erb|haml|config)
do
sed -i "" 's/[[:space:]]*$//' ${file}
sed -i "" -e :a -e '/^\n*$/N;/\n$/ba' ${file}
done
}
@uasi
uasi / vim.rb
Created November 30, 2010 16:46
Vim formula for Homebrew (EDIT: recent versions of official Homebrew distribution includes one)
require 'formula'
class Vim < Formula
homepage 'http://www.vim.org/'
url 'ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2'
head 'https://vim.googlecode.com/hg/'
sha256 '5c5d5d6e07f1bbc49b6fe3906ff8a7e39b049928b68195b38e3e3d347100221d'
version '7.3.682'
def features; %w(tiny small normal big huge) end
@napcs
napcs / .vimrc
Last active December 16, 2024 04:44
Set up Vim on Mac, Linux, or Windows. For Mac and Linux: sh <(curl -s https://gist.githubusercontent.com/napcs/532968/raw/vim.sh)
if has('win32') || has ('win64')
let $VIMHOME = $HOME."/Dropbox/dotfiles/.vim"
if !empty($CONEMUBUILD)
set term=xterm
set t_Co=256
let &t_AB="\e[48;5;%dm"
let &t_AF="\e[38;5;%dm"
endif
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')