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
import sqlparse | |
from sqlparse.sql import * # noqa | |
stmts = sqlparse.parse(open('data.sql').read()) | |
TABLE_MODEL_MAP = dict( | |
sec_rolegroup='models.RoleGroup', | |
sec_role='models.Role', | |
sec_permissiongroup='models.PermissionGroup', |
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
diff --git a/auto/lib/openssl/conf b/auto/lib/openssl/conf | |
index a65815f..6a772ed 100644 | |
--- a/auto/lib/openssl/conf | |
+++ b/auto/lib/openssl/conf | |
@@ -28,10 +28,10 @@ if [ $OPENSSL != NONE ]; then | |
have=NGX_OPENSSL . auto/have | |
have=NGX_SSL . auto/have | |
- CORE_INCS="$CORE_INCS $OPENSSL/.openssl/include" | |
- CORE_DEPS="$CORE_DEPS $OPENSSL/.openssl/include/openssl/ssl.h" |
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
export PYTHONSTARTUP=~/.pythonrc |
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
# probably missing some headers here ;) | |
sudo apt-get install build-essential python-dev libpng12-dev | |
# update pip (matplotlib wants latest) | |
sudo easy_install -U distribute | |
sudo pip install -U pyzmq "ipython[notebook]" matplotlib | |
# make stuff readable by all (got errors otherwise) | |
sudo chmod -R a+r /usr/local/lib/python2.7/dist-packages/{IPython,ipython-*,pyzmq-*,zmq*} |
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
Host foo | |
User felix | |
HostName foo.example.org | |
ProxyCommand /usr/sbin/proxytunnel --proxy=ssh-proxy.example.org:2222 --proxyauth=username:password --dest=%h:%p |
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
# keep connections alive | |
ServerAliveInterval 60 | |
# re-use connections to the same host | |
ControlMaster auto | |
# leave connection open in background | |
ControlPersist 4h | |
ControlPath /tmp/%r@%h:%p | |
# use `ssh -o ControlPath=none` to disable this temporarily | |
# and to close this: `ssh -O exit` |
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
#!/bin/bash | |
vmname=$1 | |
vboxmanage controlvm $vmname poweroff | |
vboxmanage unregistervm $vmname --delete |
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
#!/bin/bash | |
# If you set the something stupid that's not a valid hostname, then it's your | |
# own fault. :P | |
set -euo pipefail | |
echo 'Ran vboxhostname' > /tmp/x | |
echo '----------------' >> /tmp/x | |
VBoxControl guestproperty get hostname 2>&1 >> /tmp/x | |
vboxhostname=$(VBoxControl guestproperty get hostname | grep Value | awk '{ print $2 }') | |
echo "Got $vboxhostname" >> /tmp/x |
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
description "Set Hostname from virtualbox 'hostname' property" | |
start on (starting network-interface | |
or starting network-manager | |
or starting networking) | |
task | |
exec /usr/local/bin/vboxhostname |
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
#!/bin/bash | |
set -euo pipefail | |
vmname=$1 | |
PROXY=dns | |
DOMAIN=lab | |
vboxmanage clonevm node --snapshot cleanup --options link --name $vmname --register | |
vboxmanage guestproperty set $vmname hostname $vmname |