This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
#based on /usr/share/doc/git-core/contrib/hooks/post-receive-email | |
require 'syslog' | |
MARLEY_DIR="/home/git/marley" | |
def log(msg) | |
Syslog.open | |
Syslog.debug(msg) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" how to use this: vim -S mksession.vim file_to_edit | |
" based on scripts from http://vim.wikia.com/wiki/Go_away_and_come_back | |
function! SessionFile(name) | |
let b:sessions = "sessions" | |
if has("gui_running") | |
let b:sessions = b:sessions . "-gvim" | |
endif | |
let b:sessiondir = $HOME . "/.vim/" . b:sessions . getcwd() | |
return b:sessiondir . '/' . a:name | |
endfunction |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .irbrc | |
# vim: set syntax=ruby : | |
require 'irb/completion' | |
require 'irb/ext/save-history' | |
require 'fileutils' | |
require 'pp' | |
require 'rubygems' | |
ARGV.concat [ "--readline", | |
"--prompt-mode", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------------------------------------------------------------------ | |
# SCREEN SETTINGS | |
# ------------------------------------------------------------------------------ | |
startup_message off | |
#defflow on # will force screen to process ^S/^Q | |
deflogin on | |
#autodetach off |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/[\1]/' | |
} | |
export PS1="\[\e[1;36m\]\h:\w\[\e[0m\] \$(parse_git_branch) \$ " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/[\1]/' | |
} | |
export PS1="\[\e[1;36m\]\h:\w\[\e[0m\] \$(parse_git_branch) \$ " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env macruby | |
require 'hotcocoa' | |
include HotCocoa | |
NORMAL_OUTPUT_DEVICE = "Built-in Output" | |
DUMMY_OUTPUT_DEVICE = "Soundflower (2ch)" | |
def set_output_device(device) | |
`AudioSwitcher -t output -s '#{device}'` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'ffi' | |
module Exec | |
extend FFI::Library | |
attach_function :my_exec, :execl, [:string, :string, :varargs], :int | |
attach_function :fork, [], :int | |
end | |
vim1 = '/usr/bin/vim' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -s http://aserver.com/path/file.csv | ruby -rcsv -e 'puts CSV.parse($stdin.read).map { |a,b| "#{a}\t#{b}" }.join("\n")' | pbcopy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set mainfont {Monaco 12} | |
set textfont {Monaco 12} | |
set uifont {"Monaco Bold" 12} | |
set tabstop 8 | |
set findmergefiles 0 | |
set maxgraphpct 50 | |
set maxwidth 16 | |
set cmitmode patch | |
set wrapcomment none | |
set autoselect 1 |
OlderNewer