Skip to content

Instantly share code, notes, and snippets.

View Luzifer's full-sized avatar

Knut Ahlers Luzifer

View GitHub Profile
@Luzifer
Luzifer / usproxy_wor53.json
Created May 13, 2012 14:45
AWS Cloudformation template to create a running OpenVPN server in AWS US
{
"Description" : "Template to create a US proxy server",
"Parameters" : {
"KeyName" : {
"Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instances",
"Type" : "String"
},
"VPNServerPort" : {
"Description" : "TCP/IP port of the OpenVPN server",
"Type" : "String",
@Luzifer
Luzifer / gist:1008413
Created June 4, 2011 22:10
This script cleans a directory containing debian packages up leaving only the three newest versions. Package filenames must follow "<package>_<version>-<build>.deb" format and package name must not contain underscores.
#!/usr/bin/env python
import sys, os
def extract_pkg(package_file):
result = {}
package_file = package_file.replace('.deb', '')
(result['package'], tmp) = package_file.split('_')
(tmp, result['build']) = tmp.split('-')
tmp = tmp.split('.')