Skip to content

Instantly share code, notes, and snippets.

View eventi's full-sized avatar

Eugene Ventimiglia eventi

View GitHub Profile
@eventi
eventi / branch_switch
Created March 9, 2011 16:28 — forked from bobpattersonjr/branch_switch
added sudo to run git as webmaster
#!/usr/bin/perl
#March 9th 2011
#fisrt pass at branch switch script
#author bob patterson <bob at bobpattersonjr dot com>
sub trim($);
print "fetching all branchs and tags\n";
`sudo -H -u webmaster git fetch;sudo -H -u webmaster git fetch --tags`;
$new_branch = trim($ARGV[0]);
$non_branch_test = `sudo -H -u webmaster git branch|tr -d ' '|grep -x $new_branch`;
###
Module dependencies
###
require.paths.unshift "#{__dirname}/lib/support/express-csrf/"
require.paths.unshift "#{__dirname}/lib/support/node_hash/lib/"
express = require 'express'
app = module.exports = express.createServer()
RedisStore = require 'connect-redis'