This file contains 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/perl | |
# pssh | |
# -- "persistent SSH" wrapper for autossh | |
# | |
# Copyright 2010 Greg Boyington. All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without modification, are | |
# permitted provided that the following conditions are met: | |
# | |
# 1. Redistributions of source code must retain the above copyright notice, this list of |
This file contains 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
% while true; do i="`du |tail -1|cut -f1` `find . |cksum`" && [[ $i != $j ]] && rsync -aq --delete . ~/tmp/; j="$i"; sleep 30; done |
This file contains 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
" Embedded() is a function that will parse a text buffer | |
" looking for embedded vim commands, and execute them. | |
" Call it with a range of lines to check, eg to check the whole | |
" file: | |
" | |
" :%call Embedded() | |
" | |
" Commands should be prefixed by the sequence :vim: . | |
" | |
function Embedded() range |
This file contains 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
# .bashrc defaults | |
export EDITOR=/usr/bin/vim | |
export PATH=$PATH:~/bin | |
export LSCOLORS=Hxfxcxdxbxegedabagacad | |
export PS1="\[\033[01;33;01m\]\[\033[00;37;01m\]\h:\u\[\033[01;32;01m\] \d \$(date '+%T %Z') \[\033[01;32;01m\] [\[\033[01;37;01m\]$SHLVL\[\033[01;32;01m\]]\n!\!\[\033[01;33;01m\] [ \w ]\[\033[00m\] " | |
export PS2="\[\033[01;33;40m\] ?\[\033[00m\] " |
This file contains 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
# assumes wav files are named according to the format 'N. Track Name.wav' | |
ls *.wav |cut -d. -f1-2 | xargs -I % lame -V0 --vbr-new --nohist "%.wav" "%.mp3" |
This file contains 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 | |
# | |
# parse configuration options from a file in the current repository. | |
# Designed to be invoked from git hook scripts. | |
# | |
# Sample usage: toggle automatic branch building, per-branch | |
# | |
# config file looks like: | |
# BranchName=option1[,option2...] | |
# |
This file contains 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
# hook setup | |
read oldrev newrev refname | |
job="MyJenkinsJob" | |
jenkins_url="http://jenkins/job" | |
jenkins_token="seeeeekrit" | |
# what branch are we building? | |
regex='refs/heads/(.*)' | |
if [[ $refname =~ $regex ]]; then | |
target_branch="${BASH_REMATCH[1]}" |
This file contains 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
" Vim color file for xterm-256color | |
" | |
" Name: chili.vim | |
" Maintainer: Greg Boyington <[email protected]> | |
" | |
" Adapted from: | |
" Name: inkpot.vim | |
" Maintainer: Ciaran McCreesh <[email protected]> | |
" Homepage: http://github.com/ciaranm/inkpot/ | |
" |
This file contains 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 | |
# | |
# grep "Membership.*jira-users" entities.xml | |
# -- extract the lines of XML defining members of jira-users. for JIRA 4.4, these lines look like: | |
# <Membership id="10002" parentId="10002" childId="10000" membershipType="GROUP_USER" parentName="jira-users" lowerParentName="jira-users" childName="Greg.Boyington" lowerChildName="greg.boyington" directoryId="1"/> | |
# | |
# cut -d' ' -f12 | |
# -- extract just the childName attribute eg. childName="Greg.Boyington" | |
# | |
# awk '{FS="\""; print $2}' |
This file contains 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 | |
GIT_DIR=$(git rev-parse --git-dir 2>/dev/null) | |
if [ -z "$GIT_DIR" ]; then | |
echo >&2 "fatal: hooks/functions: GIT_DIR not set" | |
exit 1 | |
fi | |
read oldrev newrev refname |
OlderNewer