Skip to content

Instantly share code, notes, and snippets.

@techieBrandon
techieBrandon / common.mk
Created January 17, 2012 05:24
ruby-1.9.2-p290 - DESTDIR for make install extensions modifications
bin: $(PROGRAM) $(WPROGRAM)
lib: $(LIBRUBY)
dll: $(LIBRUBY_SO)
.SUFFIXES: .inc .h .c .y .i
RUBYLIB = -
RUBYOPT = -
SPEC_GIT_BASE = git://github.com/rubyspec
@techieBrandon
techieBrandon / nodes.pp
Created January 30, 2012 23:20
Exception from monit::cleaner
Context:
nodes.pp
node basenode {
# include redis
# include resque
# include mysql
# include apache2
# include solr
bwilburn@puppetmaster:~$ ls /etc/puppet/modules/monit/manifests/
cleaner.pp init.pp monit
@techieBrandon
techieBrandon / CMD Line
Created January 30, 2012 23:54
/etc/puppet/manifests/site.pp
bwilburn@puppet-target:~$ sudo puppet agent --test --onetime
err: Could not retrieve catalog from remote server: Error 400 on SERVER: Puppet::Parser::AST::Resource failed with error ArgumentError: Invalid resource type class at /etc/puppet/manifests/nodes.pp:7 on node puppet-target.sauce.net
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/[\1]/'
}
function proml {
local BLUE="\[\033[0;34m\]"
local RED="\[\033[0;31m\]"
local LIGHT_RED="\[\033[1;31m\]"
local GREEN="\[\033[0;32m\]"
local LIGHT_GREEN="\[\033[1;32m\]"
<%#[terry] don't render this partial directly - instead use VulnerabilitiesHelper#bulk_actions %>
<% container = 'vuln-update-selected-dialog' + suffix %>
<% bulk_actions ||= [] %>
<a href="javascript: void(0)" class='bulk-action-activate-btn action-btn' style="display:none; float: left; margin-left: 5em;" id="bulk-action-activate<%= suffix %>"><span class="icon_view_all">Update Selected<span class="bulk-update-vuln-count"></span></span></a>
<% backup, @vulnerability = @vulnerability, nil %>
<div id="hidden-<%= container %>" class="<%= container %> hidden-vuln-update-selected-dialog" style="display: none;">
<%= form_tag(params.merge(:action => :bulk_update), :id => "vuln-bulk-update-form#{suffix}") do %>
<% bulk_actions.each do |action| %>
@techieBrandon
techieBrandon / installer.sh
Created February 27, 2012 23:40
Trimmed version of custom rvm installer script
CURDIR=$PWD
MNTDIR=${PWD%/*}
RVM_SOURCE=$CURDIR/source/wayneeseguin-rvm-45a40ea
RVM_HOME=$HOME/.rvm
cd $RVM_SOURCE
echo "Preparing to execute $RVM_SOURCE/scripts/install"
su deployer -c "$RVM_SOURCE/scripts/install --path $RVM_HOME"
Status Code Status Message Symbol
1xx Informational
100 Continue :continue
101 Switching Protocols :switching_protocols
102 Processing :processing
2xx Success
200 OK :ok
201 Created :created
202 Accepted :accepted
@techieBrandon
techieBrandon / gist:5578866
Created May 14, 2013 19:42
node watch.js
//Simply run your headless jasmine specs in parallel to your daily coffeescript work
//Usage: node watch.js
var sys = require('sys');
var exec = require('child_process').exec;
var watch = require('watch')
function puts(error, stdout, stderr) {
if(stdout!=undefined){sys.puts(stdout);} if(error!=undefined){sys.puts(error);} if(stderr!=undefined){sys.puts(stderr);} }
function headlessJasmineSpecRunner(){ exec("jasmine-headless-webkit -c -j spec/jasmine.yml", puts); }
@techieBrandon
techieBrandon / gist:5578918
Created May 14, 2013 19:49
My work ~/.vimrc
syntax on
call pathogen#infect()
filetype off
filetype plugin indent on
" set nocompatible
set relativenumber
set et
set expandtab
set ignorecase