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
# bash completion for rake | |
# | |
# some code from on Jonathan Palardy's http://technotales.wordpress.com/2009/09/18/rake-completion-cache/ | |
# and http://pastie.org/217324 found http://ragonrails.com/post/38905212/rake-bash-completion-ftw | |
# | |
# For details and discussion | |
# http://turadg.aleahmad.net/2011/02/bash-completion-for-rake-tasks/ | |
# | |
# INSTALL | |
# |
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 | |
HOSTNAME=$1 | |
TMPFILE=`mktemp` | |
FNAME=$HOSTNAME.crt | |
expect_cmd() { | |
cmd=$1 | |
package=$2 | |
which $cmd &> /dev/null |
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
# load global bash completion | |
if [[ -f /etc/bash_completion ]]; then | |
. /etc/bash_completion | |
fi | |
# load everything under ~/.bash/ | |
if [[ -d $HOME/.bash/ ]]; then | |
for f in $HOME/.bash/*; do | |
source $f | |
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
# how to create new shortcuts: | |
# run ``cat > /tmp/x`` | |
# type your shortcut | |
# press enter (creates new line still in cat) | |
# press C-d to send EOF to cat | |
# run ``cat -v /tmp/x | sed 's;\^\[;\\e;'`` | |
# paste output here | |
# ipython style history | |
bind '"\e[A":history-search-backward' |
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
# http://www.letseehere.com/reverse-proxy-web-sockets | |
export VERSION=1.0.8 | |
export PREFIX=/usr/local | |
export USERNAME=nginx | |
export GECOS='nginx web server' | |
filename=nginx-$VERSION.tar.gz | |
set -x # print commands |
OlderNewer