This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cmd": ["killall node >> /dev/null; node ${file}"], | |
"selector": "source.javascript", | |
"path": "/usr/bin", | |
"shell": true | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
render: -> | |
@el.innerHTML = document.querySelector( if @id then '#'+@id else '.'+@className ).innerHTML | |
weld( @el, @model.attributes ) | |
@ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Cross-browser object.watch and object.unwatch | |
// object.watch | |
if (!Object.prototype.watch) { | |
Object.prototype.watch = function (prop, handler) { | |
var oldval = this[prop], newval = oldval, | |
getter = function () { | |
return newval; | |
}, | |
setter = function (val) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zappa = require 'zappa' | |
zappa -> | |
@configure => | |
@set 'view engine': 'jade' | |
@use require('connect-assets')() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require( 'express' ), | |
consolidate = require( 'consolidate' ), | |
app = express(); | |
var port = process.env.PORT || 80; | |
// Assign the jade engine to .html files | |
app.engine( 'html', consolidate.jade ); | |
// Set .html as the default extension |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a flexible, responsive prompt. | |
# Based on the Responsive Prompt | |
# http://jondavidjohn.com/blog/2012/12/how-to-accomplish-a-responsive-bash-prompt | |
working_directory() { | |
dir=`pwd` | |
in_home=0 | |
if [[ `pwd` =~ ^$HOME($|\/) ]]; then | |
dir="~${dir#$HOME}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Install with the following command: | |
# | |
# | |
# wget -q -O - https://gist.github.com/jmorganson/4731470/raw/system.sh | sh | |
# wget -q -O - http://files.morganson.net/system.sh | sh | |
# Ensure that the script is run as root |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
# | |
# | |
# Run with the following command: | |
# | |
# | |
# wget -q -O - https://gist.github.com/jasonmorganson/4733446/raw/user.sh | sh | |
# wget -q -O - http://user.morganson.net | sh | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
# Location of executables | |
IPSET=/usr/sbin/ipset | |
IPTABLES=/sbin/iptables | |
# Common definitions | |
COMMENT="-m comment --comment" | |
LOG="ULOG --ulog-nlgroup 1 --ulog-prefix" | |
DONT_LOG="" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app-admin/eselect | |
app-admin/logrotate | |
app-admin/sudo | |
app-admin/syslog-ng | |
app-admin/ulogd | |
app-editors/nano | |
app-editors/vim | |
app-misc/ca-certificates | |
app-misc/pax-utils | |
app-misc/tmux |
OlderNewer