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 groovy | |
// Generates server-side metadata for Perl auto-installation | |
@GrabResolver(name="m.g.o-public",root='http://maven.glassfish.org/content/group/public/') | |
@Grab(group='net.sourceforge.htmlunit', module='htmlunit', version='[2.4,)') | |
import com.gargoylesoftware.htmlunit.html.*; | |
@Grab(group="org.kohsuke.stapler",module="json-lib",version="2.1",classifier="jdk15") | |
import net.sf.json.* | |
import com.gargoylesoftware.htmlunit.WebClient |
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/sh | |
# https://gist.github.com/1396870 | |
for i in $( grep gl-auth-command ~/.ssh/authorized_keys | awk '{print $2}' | awk -F'"' '{print $1}' | sort | uniq); do | |
/home/git/bin/gl-auth-command $i get-perms | sed 's/\r//' | awk '{if ($1 ~ /R/) { print $3 ".git"; }}' > /home/git/projects.list.$i; | |
done |
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
# | |
# sorted_json.rb | |
# Puppet module for outputting json in a sorted consistent way. I use it for creating config files with puppet | |
require 'json' | |
def sorted_json(json) | |
if (json.kind_of? String) | |
return json.to_json | |
elsif (json.kind_of? Array) |
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 ruby | |
# | |
# Written by Gavin Mogan ([email protected]) | |
require 'rubygems' | |
require 'mysql2' | |
# Enable auto flush | |
STDOUT.sync = true |
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 ruby | |
# | |
# Written by Gavin Mogan ([email protected]) | |
require 'rubygems' | |
require 'transmission-rpc' | |
# Enable auto flush | |
STDOUT.sync = true |
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
<?php | |
require 'facebook-php-sdk/src/facebook.php'; | |
ini_set('display_errors', true); | |
require '/home/halkeye/git/rob_facebook_poster/config.php'; | |
/* FIXME - put your stuff here */ | |
$facebook = new Facebook(array( | |
'appId' => $config['FACEBOOK_APP_ID'], | |
'secret' => $config['FACEBOOK_APP_SECRET'], | |
)); |
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 | |
DRY_RUN= | |
DATABASE= | |
cd /tmp/ | |
mysqldump --skip-dump-date --opt --flush-logs --single-transaction ${DATABASE} bzcat -zc > ${DATABASE}.sql.bz2 | |
for i in `seq 5 -1 2`; do | |
PREV_I=$(expr $i - 1) |
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/sh | |
rm /etc/udev/rules.d/70-persistent-net.rules | |
cd /etc/sysconfig/network-scripts/ | |
TMP=`mktemp` | |
TEST=`ifconfig | grep eth | awk '{ print $5}'`; sed "s/HWADDR.*/HWADDR\=$TEST/g" ifcfg-eth0 > $TMP; mv $TMP ifcfg-eth0 |
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 | |
# Simple little script I use to update wordpress plugins | |
# Author: Gavin Mogan <[email protected]> | |
# | |
# Usage: | |
# for i in ~/wp-plugins/*; do svn sw $(updateWPPlugin $i) $i; done | |
# Changelog: | |
# Ignore any tag that has characters other than 0-9 and . | |
# This usually means that its a beta tag |
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 perl | |
print "$_\007" while (<>); |
OlderNewer