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 argparse | |
from datetime import date | |
from datetime import datetime | |
from datetime import timedelta | |
""" | |
TODO: Add timezone support | |
""" | |
# Global Variables |
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 argparse | |
import requests | |
import simplejson | |
def gitHubPost(text, mode, context): | |
"""Send a POST request to GitHub via API """ | |
payload = {'text': text, 'mode':mode} | |
if context != None: | |
payload['context'] = context | |
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
## | |
## Initial Setup | |
## | |
#Add an external repository as a submodule | |
git submodule add $GIT_REPO1 | |
git submodule add $GIT_REPO2 | |
#Grab the submodules | |
git submodule init |
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
from graph_tool.all import * | |
import argparse | |
""" Parse Commandline Arguments """ | |
parser = argparse.ArgumentParser() | |
parser.add_argument("file", help="GML file name", type=argparse.FileType('r')) | |
args = parser.parse_args() | |
""" Draw Graph """ | |
g = load_graph(args.file.name) |
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
# SHA, Date, Name<email> in color | |
git log --format='%C(yellow)%H%C(reset) %C(red)%aD%C(reset) %C(blue)%aN <%aE>%C(reset)' --stat | |
# Submodules (starting with puzzle_), SHA, Date, Name<email> | |
for i in $(find . -maxdepth 1 -mindepth 1 -type d -name "puzzle_*" | tr "\n" " "); do cd $i; echo "$i $(git log -1 --format='%H %aD %aN <%aE>')"; cd ..; done | |
# Submodules (starting with puzzle_), SHA, Date, Name<email> -- colored | |
for i in $(find . -maxdepth 1 -mindepth 1 -type d -name "puzzle_*" | tr "\n" " "); do cd $i; echo "$i $(git log -1 --format='%C(yellow)%H%C(reset) %C(red)%aD%C(reset) %C(blue)%aN <%aE>%C(reset)')"; cd ..; done | |
# List SHA for all files/directories/submodules |
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
#Install MTP Packages | |
sudo apt-get install mtp-tools mtpfs | |
#UDev entry for Nexus 7 | |
echo 'SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"' | sudo tee -a /etc/udev/rules.d/99-android.rules | |
#UDev entry for Galaxy Nexus | |
echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="685c", MODE="0666"' | sudo tee -a /etc/udev/rules.d/99-android.rules | |
#Restart UDev |
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/sh | |
### BEGIN INIT INFO | |
# Provides: deluge-daemon | |
# Required-Start: $local_fs $remote_fs | |
# Required-Stop: $local_fs $remote_fs | |
# Should-Start: $network | |
# Should-Stop: $network | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Daemonized version of deluge and webui. |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Welcome to DOMAIN</title> | |
</head> | |
<body> | |
<h1>Welcome to DOMAIN</h1> | |
<p>You have successfully arrived at your destination.</p> | |
</body> |
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
server { | |
listen 80; | |
listen 443 default_server ssl spdy; | |
ssl_certificate SITE_HOME/ssl/DOMAIN.crt; | |
ssl_certificate_key SITE_HOME/ssl/DOMAIN.key; | |
#Perfect Forward Secrecy | |
ssl_prefer_server_ciphers on; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; |
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
sudo aptitude install libpam0g-dev | |
git clone https://code.google.com/p/google-authenticator/ | |
cd google-authenticator/libpam/ | |
make | |
sudo make install | |
google-authenticator | |
sudo cp /etc/pam.d/common-account /etc/pam.d/openvpn |