start new:
tmux
start new with session name:
tmux new -s myname
| curl --user-agent "Googlebot/2.1 (+http://www.google.com/bot.html)" -v $@ | |
| <!doctype html> | |
| <title>Site Maintenance</title> | |
| <style> | |
| body { text-align: center; padding: 150px; } | |
| h1 { font-size: 50px; } | |
| body { font: 20px Helvetica, sans-serif; color: #333; } | |
| article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
| a { color: #dc8100; text-decoration: none; } | |
| a:hover { color: #333; text-decoration: none; } | |
| </style> |
| wget --no-check-certificate --content-disposition https://github.com/joyent/node/tarball/v0.7.1 | |
| # --no-check-cerftificate was necessary for me to have wget not puke about https | |
| curl -LJO https://github.com/joyent/node/tarball/v0.7.1 |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| description "Properly handle haproxy" | |
| start on startup | |
| env PID_PATH=/var/run/haproxy.pid | |
| env BIN_PATH=/usr/sbin/haproxy | |
| script | |
| exec /bin/bash <<EOF | |
| $BIN_PATH -f /etc/haproxy.cfg -D -p $PID_PATH |
| ### Hetzner Online AG - installimage | |
| # Loopback device: | |
| auto lo | |
| iface lo inet loopback | |
| # device: eth0 | |
| auto eth0 ##Hetzner Interface | |
| iface eth0 inet static | |
| address <Main IP> | |
| broadcast <Broadcast IP> |
| # Basic example | |
| siege -t60s -c20 -d10 'http://robertomurray.co.uk/' | |
| # Basic auth; | |
| auth=$(echo -n 'username:password' | openssl base64) | |
| siege -t60s -c20 -d10 --header="Authorization:Basic $auth" 'https://staging.a-hostname.co.uk/' |
| from django.contrib import admin | |
| from django.contrib.auth import admin as auth_admin | |
| from .models import * | |
| from forms import UserChangeForm, UserCreationForm | |
| class UserAdmin(auth_admin.UserAdmin): | |
| fieldsets = ( | |
| (None, {'fields': ('email', 'password')}), | |
| ('Personal info', {'fields': ('first_name', 'last_name', 'twitter', 'photo', 'event')}), |