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
require 'net/ssh' | |
#set :ssh_options, :verbose => :debug | |
set :user, 'labuser' | |
set :repo_url, "ssh://eti@localhost:9000/#{fetch(:application)}.git" | |
$gateway_ssh = {} | |
namespace :ssh do | |
task :git_start do | |
on roles(:all) do | |
hostname = host.hostname.to_s |
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
set :repo_url, "ssh://git@localhost:9000/#{fetch(:application)}.git" | |
module SSHKit; module Backend | |
class Netssh < Printer | |
alias_method :orig_ssh, :ssh | |
def ssh | |
ret = orig_ssh | |
@@created_remote ||= ret.forward.remote(22, 'gitserver', 9000) | |
return ret | |
end |
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
sub rw { my $word = "$_[0]"; $word =~ s/(.)/rc($1)/ge; $word;} | |
sub rc { return ((rand(1)*2+1)%2) ? lc($_[0]): uc($_[0]); } |
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 (<>); |
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
#!/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
#!/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
<?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
#!/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
#!/usr/bin/env ruby | |
# | |
# Written by Gavin Mogan ([email protected]) | |
require 'rubygems' | |
require 'mysql2' | |
# Enable auto flush | |
STDOUT.sync = true |