Skip to content

Instantly share code, notes, and snippets.

View atog's full-sized avatar

Koen Van der Auwera atog

View GitHub Profile
/*
As of version 1.1.2, Propane will load and execute the contents of
~Library/Application Support/Propane/unsupported/caveatPatchor.js
immediately following the execution of its own enhancer.js file.
You can use this mechanism to add your own customizations to Campfire
in Propane.
Below you'll find two customization examples.
@atog
atog / rinari
Created May 25, 2010 09:36 — forked from pjaspers/rinari
Restart passenger from emacs
;; As seen on
;; http://lucky-dip.net/articles/2009/08/06/restart-passenger-from-emacs-using-rinari/
;; Anyway, here is a small snippet of emacs lisp to easily restart the
;; Passenger server for the project you are currently working on. It
;; assumes you have Rinari installed.
(defun restart-passenger ()
"Restart passenger using the current rinari root" (interactive)
(shell-command (concat "touch " (rinari-root) "tmp/restart.txt"))
(message "Passenger restarted"))
@atog
atog / license
Created January 27, 2010 10:33 — forked from defunkt/license
#!/bin/sh -e
# Usage: license
# Prints an MIT license appropriate for totin' around.
#
# $ license > COPYING
year=`date "+%Y"`
cat <<EOF
Copyright (c) $year Chris Wanstrath
Permission is hereby granted, free of charge, to any person obtaining
module Harmony
# Allows accessing config variables from harmony.yml like so:
# Harmony[:domain] => harmonyapp.com
def self.[](key)
unless @config
raw_config = File.read(RAILS_ROOT + "/config/harmony.yml")
@config = YAML.load(raw_config)[RAILS_ENV].symbolize_keys
end
@config[key]
end