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
WARNING: Caught exception evaluating: it.isTagged(). Reason: java.lang.NullPointerException | |
java.lang.NullPointerException | |
at hudson.scm.SubversionTagAction.isTagged(SubversionTagAction.java:157) | |
at sun.reflect.GeneratedMethodAccessor73.invoke(Unknown Source) | |
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) | |
at java.lang.reflect.Method.invoke(Method.java:616) | |
at org.apache.commons.jexl.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:258) | |
at org.apache.commons.jexl.parser.ASTMethod.execute(ASTMethod.java:104) | |
at org.apache.commons.jexl.parser.ASTReference.execute(ASTReference.java:83) | |
at org.apache.commons.jexl.parser.ASTReference.value(ASTReference.java:57) |
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
""" | |
Update all directories in the svn directory | |
""" | |
import sys | |
import os | |
import subprocess | |
def svnup(directory): | |
items = os.listdir(directory) | |
for item in items: |
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
from boto.ec2.connection import EC2Connection | |
ec2 = EC2Connection() | |
reservations = ec2.get_all_instances(None, {'group-name': 'Your Group Name'}) | |
dns_names = [instance[0].dns_name for instance in [reservation.instances for reservation in reservations]] |
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
# Place in your ~/.[bash_]profile file | |
# | |
# display "username:path $ " with path in green | |
# | |
# currently works well with multiple lines, but does sometimes get a bit wonky when | |
# paging through history with the arrow keys: | |
export PS1="\u:\[\e[32;1;32m\]\W\[\e[m\] \$ " |
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
""" | |
Get the EC2 instance name (tag "Name") for the instance | |
Usage: | |
python instance_name.py [instance id] | |
On an EC2 instance, you can run: | |
python instance_name.py `ec2metadata --instance-id` |
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
# your merge test command | |
svn merge --dry-run -r 100:HEAD http://example.com/svn/repo/trunk . | |
# go ahead and run it after everything looks ok... | |
^--dry-run ^^ |
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 datetime | |
import rotatelib | |
""" | |
When you call list_archives or remove_items with an ec2snapshots argument, the library | |
will look in your environment variables for AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY. | |
If you do not want to use environment variables, you can pass those in as keyword args | |
(aws_access_key_id and aws_secret_access_key). | |
""" |
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 | |
""" | |
Output hash for a string | |
If not string is specified, then prompt for one (good for passwords). By default | |
the script will use SHA1, but you can specify any of the following: | |
--all (or -a) | |
--base64 (or -b) |
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
from boto.route53.connection import Route53Connection | |
# your amazon keys | |
key = "" | |
access = "" | |
if __name__ == '__main__': | |
zones = {} | |
route53 = Route53Connection(key, access) | |
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
#!/bin/bash | |
# | |
# Usage: | |
# ./channels.sh [filename] | |
# | |
echo "$1: " `ffmpeg -i "$1" 2>&1 | awk '/[[:digit:]] channels?/ {print "Channels:",$7}'` |