Note
Legend
- mod
- Module name
- fun
- Function name (in module)
| # -*- coding: utf-8 -*- | |
| """MyCompany Fabric script. | |
| * Deploy code | |
| * Set up a local development environment | |
| There are two ways to deploy the myrepo code: | |
| 1. :func:`deploy` will do a full virtualenv installation/update and expand a | |
| tarball of the specified git revision (defaults to HEAD) to a timestamped |
| #!/usr/bin/env bash | |
| # List stats helpful for tuning Apache | |
| APIDS=$(pgrep apache | wc -l) | |
| LOADAVG=$(< /proc/loadavg) | |
| # hopefully the prefork section is the first match... | |
| MAXCLIENT=$(grep -m 1 "^MaxClient" /etc/apache2/apache2.conf | cut -d' ' -f 2) | |
| free -mt | awk ' | |
| BEGIN { |
| # Pull the username and password out of the xml file and into local vars | |
| # Run the output through sed to escape & and _ characters for MySQL | |
| # Note: the shell quoting here gets a little rough. The final command is: | |
| # sed -e 's/[%_]/\&/g' | |
| read dbuser dbpass <<<$(xmap \ | |
| 'xmlstarlet sel -t -v "//controller-config/database/@" '${XML_FILE}' \ | |
| | sed -e '\''s/[%_]/\\\\&/g'\' \ | |
| username password) |
| /** | |
| * Allow Prototypal inheritance | |
| * http://javascript.crockford.com/prototypal.html | |
| * @author Douglas Crockford | |
| * @version 2008-04-07 | |
| * @param oldObject | |
| * @return newObject | |
| */ | |
| if (typeof Object.create !== 'function') { | |
| Object.create = function (o) { |
| # utf-8 | |
| """A fabfile to boostrap a vanilla VirtualBox master image | |
| Generally you will create a master image with the following commands:: | |
| fab -f ./bootstrap_venv_fab.py portfwd:guest=somevm-precise64-fresh | |
| fab -f ./bootstrap_venv_fab.py -H 'localhost:2222' -u somedev -p somedev shared | |
| fab -f ./bootstrap_venv_fab.py -H 'localhost:2222' -u somedev -p somedev nopasswd | |
| fab -f ./bootstrap_venv_fab.py -H 'localhost:2222' -u somedev -p somedev resetmac | |
| fab -f ./bootstrap_venv_fab.py -H 'localhost:2222' -u somedev -p somedev -- sudo shutdown -h now |
| <TaskerData sr="" dvi="1" tv="1.3.3u2m"> | |
| <Task sr="task2"> | |
| <cdate>1345254133188</cdate> | |
| <edate>1357068354779</edate> | |
| <id>2</id> | |
| <nme>Headed Home</nme> | |
| <pri>10</pri> | |
| <Action sr="act0" ve="3"> | |
| <code>902</code> | |
| <Int sr="arg0" val="0"/> |
| # Easily install, maintain, and cleanly reset (!) a Salt development | |
| # installation inside a virtualenv (no need to "activate" the venv) | |
| SRC := /home/shouse/src/salt/salt | |
| VENV := /home/shouse/tmp/venvs/salt | |
| BIN := $(VENV)/bin | |
| ETC := $(VENV)/etc/salt | |
| PKI := $(ETC)/pki | |
| VAR := $(VENV)/var | |
| TMP := $(VENV)/tmp |
| #!/usr/bin/env bash | |
| # Bootstrap a new Ubuntu machine for use as a PHP env for <company>. | |
| # These functions are intended to be run largely in the order they appear | |
| # below. | |
| NAME=$(basename $0) | |
| declare -A SITES | |
| SITES[s1]="site1" | |
| SITES[s2]="site2" |
| #!/usr/bin/env bash | |
| # Post-configure a newly imported development VM. | |
| NAME=$(basename $0) | |
| # These vars may be overridden by envionment variables of the same name but | |
| # with a preceeding "DEV_" | |
| USER=${DEV_USER:-"somedev"} | |
| PASS=${DEV_PASS:-"somedev"} | |
| VM=${DEV_VM:-"localdev"} |