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
#!/usr/bin/env python | |
# also check https://gist.github.com/fliphess/7836479 | |
import tornado.ioloop | |
import tornado.web | |
import base64 | |
import netaddr | |
import bcrypt | |
def require_basic_auth(handler_class): |
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
#!/usr/bin/env python | |
# for example itself see: https://gist.github.com/fliphess/7836469 | |
import argparse | |
import bcrypt | |
import getpass | |
import sys | |
import os.path | |
import re | |
def parse_options(): |
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
#!/usr/bin/env python | |
# Thanks to https://github.com/tomekwojcik/flask-htauth/blob/master/flask_htauth/htpasswd.py | |
import argparse | |
import os | |
import sys | |
import base64 | |
import codecs | |
import crypt | |
from hashlib import md5, sha1 | |
import logging |
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
#!/usr/bin/env python | |
import sys | |
import time | |
import os.path | |
import subprocess | |
import multiprocessing.pool as mpool | |
puppet = '/usr/bin/puppet' | |
results = [] | |
start = time.time() |
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
<?php | |
header("Cache-Control: no-cache, must-revalidate"); //HTTP 1.1 | |
$domains = array('devguppie.com', 'wwww.devguppie.com', 'www.example.com', 'example.com'); | |
foreach ($domains as $domain) { | |
$curl = curl_init("http://$domain/.*"); | |
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "PURGE"); | |
curl_exec($curl); | |
curl_close($curl); | |
} |
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/bash | |
TMPFILE="$( mktemp )" | |
## Test if there are keys loaded in the SSH agent | |
if (ssh-add -l | grep -q "The SSH agent has no identities" ) ; then | |
echo "Please add some keys to your ssh agent first!" | |
exit 1 | |
fi | |
## Get all keys from SSH agent |
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/bash | |
# This script installs a basic build environment for debian/ubuntu | |
ACTION="${1}" | |
ARGS="${#}" | |
UBUNTU_VERSION="trusty" | |
INSTALL_PACKAGES=( | |
apt-file | |
cdebootstrap |
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/bash | |
set -e | |
echo "Building package" | |
git-buildpackage --git-pbuilder --git-ignore-branch --git-dist=trusty --git-arch=amd64 |
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/bash | |
set -e | |
TAG="$1" | |
TIMESTAMP="$(date "+%Y%m%d.%H%M%S")" | |
BRANCH="$( git branch | awk '{ print $NF }' )" | |
## If this is a development build, then set tag depending on last tag +1 | |
if [ "${BRANCH}" == "develop" ] ; then | |
TAG="$( git tag -l | tail -n 1 )1" |
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/bash | |
# This script installs a basic build environment for debian | |
ACTION="${1}" | |
ARGS="${#}" | |
DEBIAN_VERSION="unstable" | |
INSTALL_PACKAGES=( | |
apt-file | |
cdebootstrap |
OlderNewer