Skip to content

Instantly share code, notes, and snippets.

View benwbrum's full-sized avatar

Ben W. Brumfield benwbrum

View GitHub Profile
@benwbrum
benwbrum / THATCampTXregex1
Created April 16, 2011 03:26
Text example for THATCamp Texas 2011 course on regular expressions.
Mr. Martin sang "On the Banks of the Ohio". Martin followed this with "The House of the Rising Sun." When he sings folk songs, Ms. Gerard and Ms. Dickens usually sing along, but at last night's performance they seemed absent while the tragic ballads were sung.
####################
Match the titles “Mr.” and “Ms.”.
Find all conjugations and tenses of “sing”.
Find all places where more than one space follows punctuation.
#!/usr/bin/env ruby
#
# Gridify draws a grid on images, producing a .grid image
# gridify.rb <pixels> <color> <file1> <file2> <file3> ...
#
# Dependencies:
# ruby
# rubygems
# ImageMagick
# RMagick gem
@benwbrum
benwbrum / gist:3974993
Created October 29, 2012 17:19
Data entry template served by Scribe
{ "created_at" : "2012-09-07T13:07:33Z",
"default_zoom" : 1.5,
"description" : "A template for transcribing GR images from eighteenth-century register",
"display_width" : 800,
"entities" : [ { "bounds" : [ ],
"created_at" : "2012-09-07T13:09:48Z",
"description" : "Baptism Record",
"fields" : [ { "entity_id" : null,
"field_key" : "date",
"id" : "5049f2038ebe6115b0000011",
@benwbrum
benwbrum / gist:3975183
Created October 29, 2012 17:48
Scribe transcription post parameters as Rails sees them.
{"transcription"=>{
"annotations"=>{
"0"=>{
"kind"=>"Baptism",
"data"=>{
"date"=>"1752-03-06",
"first_name"=>"Francis",
"father_first_name"=>"Francis", "father_last_name"=>"Pearson",
"mother_first_name"=>"Elizabeth",
"mother_last_name"=>"Pearson",
@benwbrum
benwbrum / bta_courthouse_extracts.txt
Created March 21, 2013 20:39
Blanford Towler Anderson's extracts of Brumfield records from colonial Virginia courthouses. Research done during the 1960s-80s; typescript digitized in the early 1990s and posted to RootsWeb an Usenet in the late 1990s
BRUMFIELD FAMILY HISTORY Blanford T. Anderson
Chatham, VA 24531
1607 James Brumfield (a boy of 17) came with Capt. John Smith to Jamestown.
1635-45 Richard Buck emigrated with Gates in 1610. His widow married John
Burrows, then John Bromfield, on of Bridget (Buck, Burrows) Brumfield's
daughters married Sgt. Crumps.
March 1634/55 Mrs. Bridget Brumfield was a guardian of the children of
Richard Buck.
@benwbrum
benwbrum / searches201305181235.js
Last active December 17, 2015 11:49
Searches as of 2013-05-18-12:35
{
"_id" : ObjectId("519697088ebe6117cb000001"),
"first_name" : "james",
"last_name" : "brumfield",
"fuzzy" : false,
"inclusive" : false
}
{
"_id" : ObjectId("519765248ebe6117cb000003"),
"first_name" : "James",
@benwbrum
benwbrum / longest_by_millis_201305181301.js
Created May 18, 2013 18:03
Longest queries by millis
{
"ts" : ISODate("2013-05-18T14:24:26.987Z"),
"op" : "command",
"ns" : "mv_20130513.$cmd",
"command" : {
"count" : "search_records",
"query" : {
"record_type" : "ma",
"chapman_code" : "LIN",
"primary_names" : {
Privately baptized: Recd. Into Church 2 Nov 1788.
Mary, d. Of John Lamb, junr., & Ann his wife.
Pauper.
Was privately baptized.
Illegitimate Daugr Of.
Was privately baptiz'd: Recd. Into ye Church 7 Sep 1788.
Elizabeth was a Servant.
Baptized 23rd Buried This Day.
Was born the 9 Dec 1785..
In the poor house.
@benwbrum
benwbrum / test1_index_list.js
Created May 27, 2013 01:42
FreeREG Test1 Index List
// > db.search_records.getIndexes();
[
{
"v" : 1,
"key" : {
"_id" : 1
},
"ns" : "mv_20130513.search_records",
"name" : "_id_"
},
// This appears to only contain pagination for "John Brimble" while a long-running test query was running, so is of dubious use
// > db.system.profile.find( { op: { $ne : 'command' }, millis : { $gt : 5 }, ns: 'mv_20130513.search_records' } ).sort({millis:-1}).pretty()
{
"ts" : ISODate("2013-05-26T17:20:15.140Z"),
"op" : "query",
"ns" : "mv_20130513.search_records",
"query" : {
"inclusive_names.last_name" : /\s(OR|or)\s/
},