Skip to content

Instantly share code, notes, and snippets.

Avatar

Andy Cline andy-cline

View GitHub Profile
@andy-cline
andy-cline / gist:6780cc0ea4afffca4b79f6856e60e0f5
Created Oct 23, 2016
Generate random seating assignments for a multi-session meeting.
View gist:6780cc0ea4afffca4b79f6856e60e0f5
$personTableAssignments = generateTableAssignments(8, 8);
foreach ($personTableAssignments as $personTableAssignment) {
echo (implode(', ', $personTableAssignment) . '<br />');
}
function generateTableAssignments($numSessions, $numTables)
{
$numPeople = $numSessions * $numTables;
@andy-cline
andy-cline / upgrade_svn_library.sh
Created Jun 14, 2011
Update/Upgrade a Subversion library to a new version in a nested directory structure.
View upgrade_svn_library.sh
rsync -r -t -v --exclude=.svn /Users/me/Downloads/ckeditor/ /Users/me/Sites/site_name/working/httpdocs/js/ckeditor/
@andy-cline
andy-cline / update_svn_author.sh
Created Jun 13, 2011
Change the author on a local Subversion repository.
View update_svn_author.sh
#!/bin/sh
AUTHOR=$1
FIRSTREV=$2
LASTREV=$3
for (( i = $FIRSTREV ; i <= $LASTREV; i++ ))
do
svn propset --revprop -r $i svn:author $AUTHOR
done