Skip to content

Instantly share code, notes, and snippets.

View waynegraham's full-sized avatar

Wayne Graham waynegraham

View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<ead id="BPL">
<eadheader>
<eadid>BPL</eadid>
<filedesc>
<titlestmt>
<titleproper>Boston Public Library Witchcraft Documents</titleproper>
</titlestmt>
<publicationstmt>
<publisher>University of Virginia Library</publisher>
/* the humans responsible & colophon */
/* humanstxt.org */
/* TEAM */
<your title>: <your name>
Site:
Twitter:
Location:
@waynegraham
waynegraham / gist:829608
Created February 16, 2011 15:57
scholars' lab ascii text
______ __ __ _ _____ __
.' ____ \ [ | [ | | | |_ _| [ |
| (___ \_| .---. | |--. .--. | | ,--. _ .--. .--.\_| | | ,--. | |.--.
_.____`. / /'`\] | .-. |/ .'`\ \| | `'_\ : [ `/'`\]( (`\] | | _ `'_\ : | '/'`\ \
| \____) || \__. | | | || \__. || | // | |, | | `'.'. _| |__/ |// | |, | \__/ |
\______.''.___.'[___]|__]'.__.'[___]\'-;__/[___] [\__) ) |________|\'-;__/[__;.__.'
.oooooo. oooo
d8P' `Y8b `888
888 888 ooo. .oo. .oo. .ooooo. 888 oooo .oooo.
888 888 `888P"Y88bP"Y88b d88' `88b 888 .8P' `P )88b
888 888 888 888 888 888ooo888 888888. .oP"888
`88b d88' 888 888 888 888 .o 888 `88b. d8( 888
`Y8bood8P' o888o o888o o888o `Y8bod8P' o888o o888o `Y888""8o
chkconfig --level 3 httpd on
chkconfig --level 3 tomcat6 on
@waynegraham
waynegraham / gist:883062
Last active September 25, 2015 07:08
mysql database dump
mysqldump -h [host] -u [user] --password=[password] [database] | gzip -c | cat > ~/Desktop/`date +%Y-%m-%d-%T`.sql.gz
mysqldump -h [host] -u [user] --password=[password] [database] | gzip -c | cat > ./`date +%Y-%m-%d-%T`.sql.gz
#! /usr/bin/env ruby
require 'optparse'
require 'fileutils'
# Hash to hold options parsed from command line
options = {}
optparse = OptionParser.new do |opts|
# banner at the top of the help screen
@waynegraham
waynegraham / solr-results.patch
Created March 28, 2011 15:51
Fixes pagination issue for solr results
Index: ResultsController.php
===================================================================
--- ResultsController.php (revision 3795)
+++ ResultsController.php (working copy)
@@ -17,10 +17,12 @@
//get q parameter
$query = isset($_REQUEST['q']) ? $_REQUEST['q'] : false;
- $page = $request->get('page') or $page = 1;
- $start = ($page - 1) * 10;
@waynegraham
waynegraham / gist:901669
Created April 4, 2011 13:59
Update Omeka EB from the dc.description field
UPDATE omeka_items_section_pages eb
SET eb.caption = (
SELECT et.text
FROM omeka_element_texts et
WHERE eb.item_id = et.record_id
AND et.element_id = 41);
find ./backup -type f -print0 | xargs -0 md5sum > checksum.md5