This file contains 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
function passenger_watcher { | |
while inotifywait -qq -e modify -e delete -e move -r @./.venv @./.git . ; do | |
touch tmp/restart.txt | |
done | |
} |
This file contains 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
$ npm -g list | |
... | |
npm ERR! missing: qs@~0.6.0, required by request@2.27.0 | |
npm ERR! missing: json-stringify-safe@~5.0.0, required by request@2.27.0 | |
npm ERR! missing: forever-agent@~0.5.0, required by request@2.27.0 | |
npm ERR! missing: tunnel-agent@~0.3.0, required by request@2.27.0 | |
npm ERR! missing: http-signature@~0.10.0, required by request@2.27.0 | |
npm ERR! missing: hawk@~1.0.0, required by request@2.27.0 |
This file contains 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
vm.swappines: | |
sysctl.present: | |
- value: 20 | |
echo hello: | |
cmd.wait: | |
- watch: | |
- sysctl: vm.swappines |
This file contains 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
java: | |
pkg.installed: | |
- name: openjdk-7-jre-headless | |
elasticsearch: | |
pkg.installed: | |
- sources: | |
- elasticsearch:all: https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.3.deb | |
- require: |
This file contains 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
@task | |
@roles('web') | |
def deploy(): | |
action1() | |
action2() | |
action3() | |
action4() | |
action5() | |
execute(reindex) | |
action6() |
This file contains 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
from fabric.api import run, task, roles, env, execute | |
env.roledefs = {'web': ['host1.example.com', | |
'host2.example.com'], | |
'db': ['host3.example.com']} | |
@task | |
@roles('db') |
This file contains 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
def command(foo, bar, baz=10): | |
pass | |
parser = argparse.ArgumentParser() | |
parser.add_argument('foo') | |
parser.add_argument('bar') | |
parser.add_argument('--baz', default=10) |
This file contains 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
class A(Document): | |
prop = StringProperty(default='something') | |
class B(A): | |
prop = StringProperty(default='something else') | |
class B(A): | |
pass | |
B.prop.default = 'something else' |
This file contains 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 jsdom = require('jsdom'), | |
optimist = require('optimist'), | |
prompt = require('prompt'), | |
util = require('util'), | |
sprintf = require('sprintf').sprintf, | |
fs = require('fs'), | |
http = require('http'), | |
url = require('url'); | |
This file contains 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
task(:ignore_result => false) | |
def add(a,b) | |
a + b | |
end |