Skip to content

Instantly share code, notes, and snippets.

View waldoj's full-sized avatar

Waldo Jaquith waldoj

View GitHub Profile
@waldoj
waldoj / ee-dates
Created June 3, 2013 16:22
Actual code segment from ExpressionEngine, found within /expressionengine/expressionengine/libraries/Localize.php, in convert_human_date_to_gmt(). I tracked it down in an effort to fix the software's inability to store dates from prior to 1902 <http://ellislab.com/forums/viewthread/74033>, which they had blamed on everybody but themselves.
if ($year < 1902 OR $year > 2037)
{
return $this->EE->lang->line('date_outside_of_range');
}
@waldoj
waldoj / misspelled-words.txt
Last active December 18, 2015 05:09
About 400 commonly misspelled English words, in their misspelled form, limited to those words that could not plausibly be another word. (For example, "you're" and "your" are frequently confused, but neither appear here, because both are valid words.)
absance
absense
acceptible
accidentaly
accidently
accomodate
accordian
acerage
acheive
acknowlege
@waldoj
waldoj / va.txt
Created July 3, 2013 14:30
This is a sample of the "SGML" of the the Code of Virginia that LexisNexis produces for the state, under their contract to publish Virginia's laws. These are the first few laws in the 2013 edition of the Code. What is this I don't even.
$$PROFILE=COD 1-1 Contents and designation of Code 0000000000100011 1 Code of Virginia N
<section>
| 1-1. Contents and designation of Code.
</section>
<section>
The laws embraced in this and the following titles, chapters, articles and
sections of this act shall constitute, and be designated and cited as the
"Code of Virginia," hereinafter referred to as "the Code" or "this
Code."
</section>
@waldoj
waldoj / 59.1-284.13.xml
Created August 13, 2013 21:23
State Decoded XML with some sample tabular data
<?xml version="1.0"?>
<law id="28936"><section_number>59.1-284.13</section_number><catch_line>Semiconductor Manufacturing Performance Grant Program; eligible counties.</catch_line><history>1996, cc. 642, 652; 2007, c. 813.</history><order_by>00000000019028859.1</order_by><text><section prefix="A">As used in this section:
"Eligible county" means Goochland County.
"Manufactures wafers" means the transformation of raw wafers into finished wafers (probed or unprobed).
"Qualified manufacturer" means any manufacturer of semiconductor products who (i) has made a capital investment of at least $1 billion in buildings and equipment located in an eligible county for the manufacture of wafers or activities ancillary or supportive of such manufacture in such eligible county and (ii) manufactures wafers for fast static random access memories and microprocessors, and other semiconductor products.
"Secretary" means the Secretary of Commerce and Trade or his designee.
@waldoj
waldoj / defined-terms.txt
Created October 14, 2013 01:04
A list of every term defined more than once in the Code of Virginia.
person (162)
board (142)
department (98)
commission (63)
state (56)
owner (55)
director (52)
fund (48)
authority (46)
commissioner (37)
@waldoj
waldoj / defined-terms-fl.txt
Created October 15, 2013 14:48
A list of every term defined more than once in the Florida Statutes.
department (248)
person (86)
board (71)
agency (48)
division (45)
commission (42)
secretary (23)
state (21)
bonds (20)
owner (20)
@waldoj
waldoj / vagrant-output.txt
Last active December 25, 2015 15:19
The output from Vagrant while firing up a State Decoded instance.
# vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'precise64'...
[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
@waldoj
waldoj / sbe_changelog.csv
Created November 8, 2013 14:54
Virginia State Board of Election Changelog. A look at how the SBE shares news of the changes that they make to vote tallies after elections, as they continue to refine their data.
We can't make this file beautiful and searchable because it's too large.
"ElectionName","ResultsTypeSortOrder","ResultsType","LocalityCode","LocalityName","CAPName","PrecinctCodeValue","PrecinctCodeName","CongressionalDistrictCodeValue","CongressionalDistrictCodeName","OfficeName","BallotName","TotalVotes","EffectiveDate","ExpirationDate","ChangeReason","ChangeComments","CreateDate","CreateUser","LastChangeDate","LastChangeUser"
"2013 November General","20","Provisional Votes Counted","001","ACCOMACK COUNTY"," "," "," "," "," ","Mayor - Special","Jack J. Pierson","0","2013-11-06 18:24:54.887000000","","Reported wrong from precinct","","2013-11-06 18:24:54.887000000","pwhite","2013-11-06 18:24:54.887000000","pwhite"
"2013 November General","20","Provisional Votes Counted","001","ACCOMACK COUNTY"," "," "," "," "," ","Mayor - Special","WriteIn","0","2013-11-06 18:24:54.903000000","","Reported wrong from precinct","","2013-11-06 18:24:54.903000000","pwhite","2013-11-06 18:24:54.903000000","pwhite"
"2013 November General","20","Provisional Votes Counted","001","ACCOMACK COUNTY"," "," "
@waldoj
waldoj / blog-entry-changes.md
Created November 22, 2013 19:52
Changes to @benbalter's recent blog entry.

The internet has a particular way of doing things. It's an ethos driven by a desire for resilience, for interoperability, for speed and efficiency — for preferring pragmatism over perfection. There's an unspoken set of rules born out of the hacker ethic. It's about elegant solutions, not over engineered ones, and it's what makes the internet what it is. Put another way, the internet forces us to not simply to press upload, but to reimagine desktop technologies as potential vehicles for collaboration.

There's been some talk recently, about the promise of using GitHub for data, with the excitement for the platform's disruptive potential being counterbalanced by criticism that there are use cases for which it's not ideal. That's going to be true for any technology, and like any technology, you don't solve for scale on

@waldoj
waldoj / spam_template.txt
Created January 10, 2014 20:28
A blog spammer failed to parse her variables, and sent me the raw content. I thought it was interesting.
{
{I have|I’ve} been {surfing|browsing} online more than {three|3|2|4} hours
today, yet I never found any interesting article like yours.
{It’s|It is} pretty worth enough for me. {In my opinion|Personally|In
my view}, if all {webmasters|site owners|website owners|web owners} and bloggers made good content as you did, the
{internet|net|web} will be {much more|a lot more} useful
than ever before.|
I {couldn’t|could not} {resist|refrain from} commenting.
{Very well|Perfectly|Well|Exceptionally well} written!|
{I will|I’ll} {right away|immediately} {take hold of|grab|clutch|grasp|seize|snatch} your {rss|rss feed} as I {can not|can’t} {in finding|find|to find} your