Skip to content

Instantly share code, notes, and snippets.

View talllguy's full-sized avatar
🎯
Focusing

Elliott Plack talllguy

🎯
Focusing
View GitHub Profile
@talllguy
talllguy / clip.py
Created November 29, 2013 13:40 — forked from cageyjames/clip.py
import arcpy
from arcpy import env
env.workspace = "c:/workspace"
# variables
in_features = "soils.shp"
clip_features = "study_boundary.shp"
@talllguy
talllguy / cinValidate.cpp
Last active December 30, 2015 18:19
cin validation loop
int x; // example input variable
cout << "Enter x: "
// Get the input and validate it, check if outside of range
while ((!(cin >> x)) || /* && could be used here too, on nothing else */ (x < 999))
{
cin.clear(); // Clear the error flags
cin.ignore(100, '\n'); // Remove unwanted characters from buffer
cout << "\aEnter x: "; // Sound alert and re-issue the prompt
}
@talllguy
talllguy / bcArrestRefine.md
Last active January 4, 2016 02:09
handy OpenRefine functions for Baltimore City Arrests data mapping

Convert dates to ISO 8601

value.toDate('mm/dd/yyyy').toString('yyyy-mm-dd')

Combine date / time columns

cells["arrestDate"].value + "T" + cells["arrestTime"].value + ":00-05:00"

Capitalize CDS abbrieve

@talllguy
talllguy / presentationNotes.md
Last active January 4, 2016 02:09
my civic hacking meetup talking points
public class node {
int data;
node next;
public node()
{data = 0; next = null;}
public node(int x, node n)
{data = x; next =n;}
@talllguy
talllguy / MyLinkedList.java
Last active August 29, 2015 13:57
Playing with LinkedLists
public class MyLinkedList {
private static node head;
public void DisplayList(node q)
{if (q != null) {
System.out.println(q.data);
DisplayList(q.next);}}
public void Buildlist() throws IOException
{node q = new node(0,null);
node head = q;
String oneLine;
@talllguy
talllguy / fc.py
Last active August 29, 2015 14:00
DNR-Lands-to-OSM
replace( "DNRNAME",'SF','State Forest')
replace( "DNRNAME",'FMA','Fish Management Area')
replace( "DNRNAME",'FT','Fire Tower')
replace( "DNRNAME",'SP','State Park')
replace( "DNRNAME",'CFL','Chesapeake Forest Lands')
replace( "DNRNAME",'NRMA','Natural Resource Management Area')
replace( "DNRNAME",'NEA','Natural Environment Area')
replace( "DNRNAME",'WMA','Wildlife Management Area')
replace( "DNRNAME",'HCF','Heritage Conservation Fund Site')
net stop spooler
rundll32.exe setupapi.dll,InstallHinfSection AdobePDFPortMonitor 128 C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\Xtras\AdobePDF\AdobePDF.inf
net start spooler
rundll32.exe printui.dll,PrintUIEntry /if /b "Adobe PDF" /f "C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\Xtras\AdobePDF\AdobePDF.inf" /r "Documents\*.pdf" /m "Adobe PDF Converter"
@talllguy
talllguy / dnrNameExpand
Last active August 29, 2015 14:01
Expands fields in Md DNR data
CASE WHEN name = 'SF' THEN 'State Forest'
WHEN name = 'FMA' THEN 'Fish Management Area'
WHEN name = 'FT' THEN 'Fire Tower'
WHEN name = 'SP' THEN 'State Park'
WHEN name = 'CFL' THEN 'Chesapeake Forest Lands'
WHEN name = 'NRMA' THEN 'Natural Resource Management Area'
WHEN name = 'NEA' THEN 'Natural Environment Area'
WHEN name = 'WMA' THEN 'Wildlife Management Area'
WHEN name = 'HCF' THEN 'Heritage Conservation Fund Site'
END
@talllguy
talllguy / social.html
Last active August 29, 2015 14:01
Canton website social media
<p>&nbsp;<span style="font-family: inherit; font-size: 1em; line-height: 1.5em;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span>
<a style="font-family: inherit; font-size: 1em; line-height: 1.5em;" href="http://www.facebook.com/home.php?#!/pages/Canton-Community-Association/201172126560?ref=ts" target="_blank"></a>
</a>
<img src="/images/facebook.png" alt="" width="35" height="35" />
</a>
<span style="font-family: inherit; font-size: 1em; line-height: 1.5em;">&nbsp; &nbsp;</span><a style="font-family: inherit; font-size: 1em; line-height: 1.5em;" href="http://twitter.com/cantonbaltimore" target="_blank"><img src="/images/twitter.png" alt="" width="35" height="35" />
</a>
</p>