Skip to content

Instantly share code, notes, and snippets.

View NickWoodhams's full-sized avatar

Nick Woodhams NickWoodhams

View GitHub Profile
@NickWoodhams
NickWoodhams / opendoor.php
Created July 24, 2016 20:39
Open door script (takes input from twilio)
<?php
print("function called!");
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
function CallAPI($method, $url, $data = false)
{
@NickWoodhams
NickWoodhams / Dockerfile
Created March 8, 2016 22:40
Running Deluge behind OpenVPN in Docker Container
#sudo docker run --name openvpn-deluge --privileged --restart=always -v /home/nick/Dev/vpn:/vpn -v /home/deluge/.config/deluge:/deluged/config -v /disk1:/disk1 -i -t openvpn_deluge /bin/bash
FROM ubuntu:14.04
MAINTAINER Nick Woodhams
RUN apt-get -y update
RUN apt-get install -y openvpn
RUN apt-get install -y deluged deluge-web deluge-console
COPY start.sh start.sh
CMD ["/start.sh"]
@NickWoodhams
NickWoodhams / quickssl.bundle
Created February 2, 2016 18:02
QuickSSL Premium CA Bundle - Order of Certificates: Domain -> CA -> Root
-----BEGIN CERTIFICATE-----
MIIERDCCAyygAwIBAgIDAjp4MA0GCSqGSIb3DQEBCwUAMEIxCzAJBgNVBAYTAlVT
MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i
YWwgQ0EwHhcNMTQwODI5MjIyNDU4WhcNMjIwNTIwMjIyNDU4WjBmMQswCQYDVQQG
EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEdMBsGA1UECxMURG9tYWluIFZh
bGlkYXRlZCBTU0wxIDAeBgNVBAMTF0dlb1RydXN0IERWIFNTTCBDQSAtIEc0MIIB
IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA30GUetr35DFDtuoBG1zOY+r6
baPZau4tmnX51ZxbvTTf2BzJbdgEiNputbe18DCuQNZd+sRTwdQinQROEaaV1UV8
QQVY4Ezd+e5VvV9G3K0TCJ0s5PeC5gcrng6MNKHOxKHggXCGAAY/Lep8myiuGyiL
OQnT5/BFpLG6EWeQVXuP3u04XKHh44PEw3KRT5juHMKAqmSlPoNiHMzgnvhawBMS
@NickWoodhams
NickWoodhams / pwd.py
Created August 27, 2015 03:50
Copies current directory to clipboard. If you have a filename arg after, it will include this filename. If it's got /static in the path it will copy the relative url (useful when coding in Flask)
#!/usr/local/bin/python
import os
import sys
import subprocess
from pprint import pprint
if len(sys.argv) > 1:
path = os.getcwd() + "/" + sys.argv[1]
else:
@NickWoodhams
NickWoodhams / .zshrc
Created August 27, 2015 03:47
Dotfile for command line. Jump and go are pretty awesome.
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
ZSH_THEME="pure"
# Aliases
alias pyc='find . -name "*.pyc" -exec rm -rf {} \;'
alias v="source venv/bin/activate"
alias extra="sudo sh /Users/nick/Dropbox/Automation/copy-extra-settings-manually.sh"
alias a="sudo apachectl graceful"
alias n="sudo nginx -s stop && sudo nginx;"
@NickWoodhams
NickWoodhams / config.plist
Created August 5, 2015 18:33
Clover config (X99-UD5 with Software Raid 0)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ACPI</key>
<dict>
<key>DSDT</key>
<dict>
<key>Debug</key>
<false/>
@NickWoodhams
NickWoodhams / Test2.efi
Created June 4, 2015 02:43
Recompiled OsxLowMemFixDrv-64.efi Driver to Fix OsxAptioFixDriv Error
4d5a 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 8000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
5045 0000 6486 0400 0000 0000 0000 0000
0000 0000 f000 2e00 0b02 0000 e004 0000
@NickWoodhams
NickWoodhams / mount.sh
Created June 2, 2015 20:58
Mount NFS Volume on Mac
#!/bin/bash
mkdir /Volumes/disk2
mount -t nfs m3dia.us:/export/disk2 /Volumes/disk2
@NickWoodhams
NickWoodhams / google_website_categories.txt
Created June 2, 2015 03:42
Website Categories - Google
Arts & Entertainment
Beauty & Personal Care
Business & Industrial
Computers & Consumer Electronics
Dining & Nightlife
Family & Community
Finance
Food & Groceries
Health
Hobbies & Leisure
@NickWoodhams
NickWoodhams / indico_text_tags.txt
Created June 2, 2015 03:40
indico text tags (API v2)
Dieting
Golf
Fishing
Islam
Relationships
Atheism
Hunting
Personal
Nostalgia
Writing