Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
git_exists=`git branch 2>/dev/null | sed -ne'/^\* /s///p'`
if [[ "$git_exists" != "" ]]; then
if [[ "$git_exists" == "(no branch)" ]]; then
git_exists="\e[31m\]$git_exists\e[0m\]"
fi
echo "$git_exists "
elif [ -d .svn ]; then
@smathy
smathy / gh.sh
Created October 7, 2011 00:47 — forked from marioBonales/gh.sh
#!/bin/sh
current_git_branch() {
git_exists=`git branch 2>/dev/null | sed -ne'/^\* /s///p'`
if [[ "$git_exists" != "" ]]; then
if [[ "$git_exists" == "(no branch)" ]]; then
git_exists="\e[31m\]$git_exists\e[0m\]"
fi
echo "$git_exists "
require('zappa') ->
@enable 'serve jquery'
@get '/:foo/:bar?': ->
"Foobar"
function! Make_vimsession()
execute("mksession! " . g:vimsession)
endfunction
command! SS call Make_vimsession()
function! Set_vimsession()
let cwd = getcwd()
while ! ( isdirectory( cwd . "/.git" ) || cwd == "/" )
let cwd = simplify( cwd . "/.." )
--- Portfile.orig 2011-05-04 12:40:45.000000000 -0700
+++ Portfile 2011-05-04 12:40:53.000000000 -0700
@@ -84,6 +84,7 @@
--with-mhash=${prefix} \
--with-pcre-regex=${prefix} \
--with-readline=${prefix} \
+ --with-libexpat-dir=${prefix} \
--with-libxml-dir=${prefix} \
--with-zlib=${prefix} \
--without-pear \
####################################################################################################################################################################################### st (183)
######################################################################################################### l (105)
#################################################################### ci (68)
####################################################### add (55)
###################################################### co (54)
################################################## push (50)
######################################## down (40)
##################################### la (37)
################################### show (35)
################################# d (33)
green = #80B280
matrixgreen = #C6DABF
matrixyellow = #E6E680
borderdiff = 30
@import "mixins/border-radius"
body
get '/': ->
render 'index.jade', layout: 'layout.coffee'
view layout: ->
html ->
head ->
...etc...
view 'index.jade': """
p Blah
huntMen : function(buffy) {
var soulmates = [];
while (soulmates.length < 10) {
// Get 10 candidates for Buffy
getMatches( buffy, 10, function(userids) {
for (var i = 0; i < userids.length; i++) {
File.open( php_session_file_name, File::WRONLY|File::CREAT ) do |io|
io.flock File::LOCK_EX
io.truncate(0)
io.print prepared_session.to_wddx
end