This file contains hidden or 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
hugh3869@hughsaunders:/tmp$ gpg --gen-key | |
gpg (GnuPG) 1.4.11; Copyright (C) 2010 Free Software Foundation, Inc. | |
This is free software: you are free to change and redistribute it. | |
There is NO WARRANTY, to the extent permitted by law. | |
Please select what kind of key you want: | |
(1) RSA and RSA (default) | |
(2) DSA and Elgamal | |
(3) DSA (sign only) | |
(4) RSA (sign only) |
This file contains hidden or 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 clouddns module | |
import clouddns | |
#Authenticate to API | |
dns=clouddns.connection.Connection('YOUR RACKSPACE CLOUD USERNAME','YOUR API KEY') | |
#Get domain object | |
domain=dns.get_domain(name='wherenow.org') |
This file contains hidden or 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
#clone the repository from github | |
hugh@pond-ng:~/git$ git clone https://github.com/rackspace/python-clouddns.git | |
Cloning into 'python-clouddns'... | |
remote: Counting objects: 208, done. | |
remote: Compressing objects: 100% (102/102), done. | |
remote: Total 208 (delta 124), reused 185 (delta 104) | |
Receiving objects: 100% (208/208), 38.14 KiB, done. | |
Resolving deltas: 100% (124/124), done. | |
hugh@pond-ng:~/git$ ls |
This file contains hidden or 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
#munin plugin configuration, on debian this goes in /etc/munin/plugin-conf.d/ | |
[orange] | |
timeout 240 | |
env.owuser YOUR-PHONENUMBER-HERE | |
env.owpass YOUR-PASSWORD-HERE |
This file contains hidden or 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
Scripts: | |
* setup.py creates cloud instances,installs and starts jmeter-server | |
* cleanup.py destroys cloud instances who's name matches a pattern | |
Usage: | |
1) edit setup.py, and insert your username/api key/ssh keys. Define the number of instances you want | |
1a) install the dependencies listed at the top of setup.py | |
2) run setup.py | |
3) edit jmeter.properties and add the line specified at the end of setup.py's output | |
4) run jmeter, build a test plan, and start on all remotes. |
This file contains hidden or 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 re | |
from django import template | |
register=template.Library() | |
class PropertyListNode(template.Node): | |
def __init__(self,model_string,format_spec): | |
self.model_string=model_string | |
self.format_spec=format_spec | |
def render(self,context): |
This file contains hidden or 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
hms:~ hms$ airport -s | |
SSID BSSID RSSI CHANNEL HT CC SECURITY (auth/unicast/group) | |
BTHomeHub2-M42K 00:24:17:de:50:21 -55 1 N -- WPA(PSK/AES,TKIP/TKIP) WPA2(PSK/AES,TKIP/TKIP) | |
BTOpenzone-H 02:24:17:de:50:22 -55 1 N -- NONE | |
storrier 00:26:44:90:0d:0b -39 1 Y -- WPA(PSK/TKIP/TKIP) WPA2(PSK/AES/TKIP) | |
BTFON 02:24:17:de:50:23 -55 1 N -- NONE | |
BTOpenzone-H 02:24:17:f1:e9:a8 -68 1 Y -- NONE | |
BTFON 02:24:17:f1:e9:a9 -68 1 Y -- NONE | |
BTHomeHub2-G2CH 00:24:17:f1:e9:a7 -67 1 Y -- WPA(PSK/AES,TKIP/TKIP) WPA2(PSK/AES,TKIP/TKIP) | |
SKY02133 00:24:b2:f7:3b:06 -85 6 N -- WPA(PSK/TKIP/TKIP) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 | |
# HuntGroupReminder - Hugh Saunders 2011 | |
# This is probably the most annoying program ever. | |
# It pops up a window before and after screen locking in order to remind me to login/logout of my desk phone. | |
# Actually, I couldn't figure out how to show a window before screen lock, so you have to call this program instead of locking the screen. | |
# This script will initiate screen lock via dbus once the initial window has been shown, it then subscribes to a dbus signal so it is notified | |
# when the screen is unlocked | |
# To use this in ubuntu: goto system > preferences > keyboard shortcuts. |
This file contains hidden or 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
{%extends "admin/base.html" %} | |
{% block extrahead %} | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script> | |
<script> | |
$(document).ready(function(){ | |
$('.add-another').each(function(i,o){ | |
select_obj=$(o).parent().find('select')[0]; | |
item_id=select_obj.options[select_obj.selectedIndex].value; |