By resources
sessions
list-sessions ls -- List sessions managed by server
new-session new -- Create a new session
| #!/bin/bash | |
| # Configuration for the script | |
| POSTFIX_CONFIG=/etc/postfix/main.cf | |
| POSTFIX_SASL=/etc/postfix/sasl_passwd | |
| function confirm () { | |
| read -r -p "${1:-Are you sure? [Y/n]} " response | |
| if [[ $response == "" || $response == "y" || $response == "Y" ]]; then | |
| echo 0; |
| from collections import defaultdict | |
| import boto3 | |
| """ | |
| A tool for retrieving basic information from the running EC2 instances. | |
| """ | |
| # Connect to EC2 | |
| ec2 = boto3.resource('ec2') |
In some cases the IC might determine that a PM meeting for the incident isn't needed.
If the IC decides to waive the meeting please replace the Meeting section with a
note indicating the meeting has been waived (example: Meeting waived: Paul Mooring)
| 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')}), |
| # 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/' |
| ### 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> |
| 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 |
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