Skip to content

Instantly share code, notes, and snippets.

View tomkersten's full-sized avatar

Tom Kersten tomkersten

View GitHub Profile
require 'autotest/timestamp'
#require 'autotest/heckle'
#require 'autotest/redgreen'
require 'autotest/screen'
$VERBOSE=false
Autotest.add_hook :initialize do |autotest|
autotest.add_exception(/^\.\/vendor/)
autotest.add_exception(/^\.\/artwork/)
autotest.add_exception(/^\.\/public/)
@tomkersten
tomkersten / license
Created January 28, 2010 03:44 — forked from defunkt/license
#!/bin/sh -e
# Usage: license
# Prints an MIT license appropriate for totin' around.
#
# $ license > COPYING
#!/bin/sh
echo "Copyright (c) `date +%Y` Chris Wanstrath
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
# Assume 2 branches named 'current' and 'master'
# Show me the commits I have in current, which are not in master
git log current..master --pretty=oneline
# Show me commits in master which are not in my current branch
git log master..current --pretty=oneline
# Show me stuff that people have pushed to 'master' which I don't have yet (we'll call it 'origin' in this case),

Poor Man's Deploy

  • Start a Sinatra server on port 4000
  • GET / to that server triggers a git pull and mod_rails restart
  • Hit port 4000 locally after pushing

Why?

Copy SSH public key to clipboard
@tomkersten
tomkersten / go.rb
Created June 26, 2010 02:31 — forked from roykolak/go.rb
require 'codefumes_harvester'
include CodeFumesHarvester
# Start the JavaScript Specs build...
QuickBuild.start('javascript specs');
# ...
# if it failed...
QuickBuild.finish('javascript specs', 'failed');
#!/usr/bin/ruby
require 'rubygems'
require 'codefumes_harvester'
def ant_success?
ENV['ANT_RET'] == '0'
end
pub_key = ENV['CF_PUBLIC_KEY']
#!/usr/bin/ruby
require 'rubygems'
require 'codefumes_harvester'
def cuc_success?
ENV['CUC_RET'] == '0'
end
def spec_success?
# File: /etc/bash.bashrc
# System-wide .bashrc file for interactive bash(1) shells.
# To enable the settings / commands in this file for login shells as well,
# this file has to be sourced in /etc/profile.
# If not running interactively, don't do anything
if [[ -z "$PS1" ]]; then
@tomkersten
tomkersten / monit file
Created October 17, 2010 05:00
/etc/init.d/monit file
We couldn’t find that file to show.