Skip to content

Instantly share code, notes, and snippets.

View textarcana's full-sized avatar

Noah Sussman textarcana

View GitHub Profile
@textarcana
textarcana / 1-1000.txt
Created August 28, 2016 20:01 — forked from deekayen/1-1000.txt
1,000 most common US English words
the
of
to
and
a
in
is
it
you
that
@textarcana
textarcana / pre-commit
Created September 2, 2015 18:41 — forked from dy-dx/pre-commit
Pre-commit hook that prevents debugging code and merge artifacts from being committed.
#!/bin/bash
# Pre-commit hook that prevents debugging code and merge artifacts from being committed.
FILES_PATTERN='\.(php|ctp|ctpm|css|rb|erb|haml|js|coffee)(\..+)?$'
FORBIDDEN=( "binding\.pry" "save_and_open_page" "debugger" "it\.only" "describe\.only" ">>>>>>" "<<<<<<" "======" )
# the exit code from `grep -E $FILES_PATTERN` gets swallowed unless the pipefail option is set
set -o pipefail
@textarcana
textarcana / pre-push.sh
Last active January 10, 2016 11:19 — forked from ScotterC/pre-push.sh
Git Hook PrePush protection for force pushing
#!/bin/sh
# Called by "git push" after it has checked the remote status,
# but before anything has been pushed.
#
# If this script exits with a non-zero status nothing will be pushed.
#
# Steps to install, from the root directory of your repo...
# 1. git config --global init.templatedir '~/.git-templates'
# 2. mkdir -p ~/.git-templates/hooks
@textarcana
textarcana / index.html
Last active August 29, 2015 14:21 — forked from biovisualize/index.html
d3 Game of Life / cellular automaton
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title></title>
<script type='text/javascript' src="http://mbostock.github.com/d3/d3.js"></script>
<style type='text/css'>
.cell{
stroke: none;
}
<iframe src="http://www.slideshare.net/slideshow/embed_code/11846374?rel=0" width="427" height="356" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" style="border:1px solid #CCC; border-width:1px 1px 0; margin-bottom:5px; max-width: 100%;" allowfullscreen> </iframe> <div style="margin-bottom:5px"> <strong> <a href="https://www.slideshare.net/noahsussman/software-entomology-or-where-do-bugs-come-from" title="Software Entomology or Where Do Bugs Come From?" target="_blank">Software Entomology or Where Do Bugs Come From?</a> </strong> from <strong><a href="http://www.slideshare.net/noahsussman" target="_blank">Noah Sussman</a></strong> </div>
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
# 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
@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 ;
}
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 / 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))