Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Benjamin Bengfort bbengfort

🎯
Focusing
View GitHub Profile
View Penn Treebank II Tags.md
@jchonglee
jchonglee / starwhy.css
Last active Dec 25, 2015
Star Wars graph. Listen to this while viewing: http://www.youtube.com/watch?v=kuovuHvaxlU
View starwhy.css
/* Graph Stylesheet for Why-Visualization */
.node {
stroke: #fff;
stroke-width: 1.5px;
}
.text, .text-hover {
pointer-events: none;
font: 0.3em sans-serif;
@gregawoods
gregawoods / ksdiffdir.rb
Last active Oct 25, 2021
Show the diff between two folders in Kaleidoscope for OS X. While you can do this out of the box with the `ksdiff` command line tool it does not dive into subdirectories like I wanted. Usage: ksdiffdir.rb path/to/a path/to/b
View ksdiffdir.rb
#!/usr/bin/env ruby
# Usage:
# ksdiffdir.rb /path/to/a /path/to/b
FOLDER_A = ARGV[0]
FOLDER_B = ARGV[1]
def build_file_list(dir_path)
Dir.glob("#{dir_path}/**/*").select{ |f| File.file?(f) }.collect{ |f| f.gsub("#{dir_path}", '') }
View etcinit.dhttp-proxy.sh
#!/bin/bash
DIR=/var/www/YOUR_APP_NAME
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
NODE_PATH=/usr/local/lib/node_modules
case $1 in
start)
nohup "node" "$DIR/proxy.js" 1>>"$DIR/logs/proxy.log" 2>&1 &
echo $! > "$DIR/pids/proxy.pid";
;;