Skip to content

Instantly share code, notes, and snippets.

View ddub's full-sized avatar

Duncan Ward ddub

View GitHub Profile
http://imgur.com/nnHdBlG.png
http://imgur.com/wnQg3sr.png
http://imgur.com/ooNiAms.png
http://imgur.com/VNbiix4.png
http://imgur.com/Nndc3OQ.png
http://imgur.com/PW36jQF.png
http://imgur.com/583qRKg.png
http://imgur.com/vYTYpCP.png
http://imgur.com/qLG3kl2.png
http://imgur.com/KMihSN6.png
document.getElementsByClassName('icon-return')[0].click()
document.getElementsByClassName('js-return-title')[0].click()
#!/bin/bash
I=eth0
PORT=6601
tc qdisc del dev $I root
tc qdisc add dev $I handle 1: root htb
tc class add dev $I parent 1: classid 1:1 htb rate 100Mbps
tc qdisc add dev $I parent 1:1 handle 10: netem delay 5000ms
tc filter add dev $I protocol ip parent 1: prio 1 u32 match \
ip dport $PORT 0xffff flowid 1:1
tc filter add dev $I protocol ip parent 1: prio 1 u32 match \
@ddub
ddub / Dockerfile
Last active January 19, 2016 03:48
show-ips-for-asg
FROM python:3-onbuild
RUN chmod 755 *.py
ENTRYPOINT [ "/usr/src/app/show-ips-for-asg.py" ]
---
swagger: '2.0'
info:
description: 'This defines the api for the international bass station [http://intbass.com](http://intbass.com).'
version: '1.0.0'
title: 'International Bass Station'
termsOfService: 'http://intbass.com/do/not/be/a/dick/'
contact:
email: 'crew@intbass.com'
license:
@ddub
ddub / gist:a95f719c3c032a5e415d
Created June 20, 2015 14:02
SVG Down arrow circle
<svg class="arrow" viewBox="0 0 242.818 242.818" style="opacity: 1; top: 98.9956970977637%;">
<path d="M121.41 23.45c-54.017 0-97.96 43.944-97.96 97.96 0 54.017 43.943 97.958 97.96 97.958s97.958-43.943 97.958-97.96c0-54.016-43.942-97.958-97.96-97.958zm64.133 83.16l-.69.864-63.122 63.695-63.757-63.75c-3.03-3.013-3.336-8.24-.695-12.155l.007.015.003.004.65-.798c1.37-1.404 3.836-2.817 6.276-2.817 3.497 0 5.423 1.957 6.257 2.786l51.2 50.69 50.718-50.693c1.347-1.37 3.817-2.772 6.226-2.772 3.518 0 5.52 2.07 6.275 2.845 2.98 2.978 3.287 8.21.654 12.084z"></path>
</svg>
@ddub
ddub / coreos-ansible-bootstrap.sh
Last active August 29, 2015 14:21
Bootstrap Ansible on CoreOS
#/bin/bash
set -e
cd
if [[ -e $HOME/.bootstrapped ]]; then
exit 0
fi
Vagrant.configure(2) do |config|
config.vm.box = "dreamscapes/archlinux"
config.vm.provision "shell", path: "provision.sh"
end
@ddub
ddub / gist:c8907e4dae02fb63743f
Created September 16, 2014 21:24
Remove all files but...
---
- hosts: all
gather_facts: false
tasks:
- name: "list html directory"
command: 'ls /var/www/html'
register: listing
- name: "remove"
debug: var=item
@ddub
ddub / base.sh
Created June 4, 2014 21:37
RHEL 7RC Packer
#!/bin/bash
# Remove 5s grub timeout to speed up booting
echo "[*] Removing grub timeout"
sed -i.orig -e 's/GRUB_TIMEOUT=5/GRUB_TIMEOUT=0/' /etc/default/grub
/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
cat <<EOF > /etc/yum.repos.d/freshbooks-seven-rc.repo
# Name: FreshBooks RHEL 7 RPM repository
[freshbooks-seven-rc]