Skip to content

Instantly share code, notes, and snippets.

View textarcana's full-sized avatar

Noah Sussman textarcana

View GitHub Profile
@textarcana
textarcana / autounit
Created June 29, 2010 03:13 — forked from erithmetic/autounit
PHP continuous testing with Watchr
# Prereqs:
# * Ruby
# * gem install watchr
# Usage:
# copy autounit to php project directory
# run watchr autounit
watch('test/.*Test\.php') do |md|
puts "\e[H\e[2J" #clear console
Replace 'jsheckler' with your own User ID in the steps below.
Edit in /etc/sysconfig/hudson:
HUDSON_HOME="/home/jsheckler/.hudson"
HUDSON_USER="jsheckler"
HUDSON_PORT="8989"
then:
@textarcana
textarcana / autounit
Created September 9, 2010 03:00 — forked from erithmetic/autounit
# Prereqs:
# * Ruby
# * gem install watchr
# Usage:
# copy autounit to php project directory
# run watchr autounit
watch('test/.*Test\.php') do |md|
puts "\e[H\e[2J" #clear console
export HISTCONTROL=ignoreboth
export HISTSIZE=5000
export EDITOR="emacs --no-init-file --no-site-file --no-splash"
export SVN_EDITOR=$EDITOR
export RUBYOPT=rubygems
####################################
# BASIC REQUIREMENTS
# http://graphite.wikidot.com/installation
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/
# Last tested & updated 7/13/2012
####################################
sudo apt-get update
sudo apt-get upgrade
@textarcana
textarcana / init-markdown-mode.el
Created July 13, 2012 18:54 — forked from s-amemiya/init-markdown-mode.el
init.el for markdown-mode
(add-to-list 'load-path "~/.emacs.d/vendor/github/markdown-mode")
(autoload 'markdown-mode "markdown-mode.el" "Major mode for editing Markdown files" t)
(setq auto-mode-alist (cons '("\\.text" . markdown-mode) auto-mode-alist))
diff -ru a/webapp/content/js/composer_widgets.js b/webapp/content/js/composer_widgets.js
--- a/webapp/content/js/composer_widgets.js 2010-02-26 16:12:54.000000000 +0000
+++ b/webapp/content/js/composer_widgets.js 2010-09-15 07:03:56.000000000 +0000
@@ -531,6 +531,7 @@
{text: 'Line Width', handler: this.applyFuncToEachWithInput('lineWidth', 'Please enter a line width for this graph target')},
{text: 'Dashed Line', handler: this.applyFuncToEach('dashed')},
{text: 'Keep Last Value', handler: this.applyFuncToEach('keepLastValue')},
+ {text: 'Fill Value', handler: this.applyFuncToEachWithInput('fillValue', 'Please enter a value to fill. Leave blank for 0', true)},
{text: 'Substring', handler: this.applyFuncToEachWithInput('substr', 'Enter a starting position')}
]
@textarcana
textarcana / graphline.sh
Created July 29, 2012 13:33 — forked from mrtazz/graphline.sh
shell function to quickly check a graphite graph
#
# shell function to print graphite graphs as sparklines in the terminal
# needs https://github.com/holman/spark
#
function graphline() {
GRAPHITEHOST="graphite.example.com"
if [ ! -n "$1" ]; then print "Usage: $0 metric [minutes]"; return 1; fi
if [ ! -n "$2" ]; then MINUTES=10 ; else MINUTES=$2; fi
curl -s "${GRAPHITEHOST}/render?from=-${MINUTES}minutes&target=${1}&format=raw" | cut -d"|" -f 2 | spark ;
}
# Noah Sussman's CentOS .profile
if [ "$SSH_TTY" ]; then
# If this is a remote session, then start screen
if [ "$TERM" != "screen" ]; then
screen -xRRU
if [ "$?" = "0" ]; then
reset
exit
fi
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶