I hereby claim:
- I am eeeschwartz on github.
- I am eeeschwartz (https://keybase.io/eeeschwartz) on keybase.
- I have a public key whose fingerprint is 8A1B DE14 101E 084D 91C4 482A 13C7 2B1F 64A2 23CD
To claim this, I am signing this object:
# search markdown links and convert | |
# [do some cool thing](#fn-infer) => <a name="do-some-cool-thing"></a>[do some cool thing](#do-some-cool-thing) | |
def transform(line) | |
fn_name = 'fn-infer' | |
md_regex = %r{[^`]?\[(.*)\]\(##{fn_name}\)} | |
name_regex = %r{##{fn_name}} | |
a_regex = %r{\[} | |
p line | |
if (line =~ md_regex) |
class AnyOldClass | |
attr_accessor :array_attr | |
def initialize | |
self.array_attr = [] | |
this_is_fine | |
self.array_attr = [] | |
this_also_fine |
// based on https://github.com/mapbox/geo-googledocs | |
// install the script and run the geocode once to set the api and key | |
// in the script window, set up a trigger in `Resources > Current Project triggers` | |
// run geocodeFromCache once a minute | |
// | |
// Global variables | |
var ss = SpreadsheetApp.getActiveSpreadsheet(), | |
sheet = ss.getActiveSheet(), | |
activeRange = ss.getActiveRange(), | |
settings = {}; |
curl -v $CKAN_BASE_URL/api/action/resource_create \ | |
--form name="Complaints" \ | |
--form id="$resource_id" \ | |
--form package_id="$package_id" \ | |
--form format="csv" \ | |
--form url="http://104.131.23.252/datastore/dump/$resource_id" \ | |
-H "Authorization: $CKAN_API_KEY" | |
sleep 5 |
CKAN_BASE_URL=http://www.civicdata.com | |
CKAN_API_KEY=from-ckan-users-profile-page | |
resource_id='2691aff1-e555-48d3-9188-aebf1fa8323e' | |
fields='[{"id":"ID","type":"integer"},{"id":"Date","type":"date"},{"id":"Address","type":"text"},{"id":"Suite","type":"text"},{"id":"PermitType","type":"text"},{"id":"ConstructionCost","type":"integer"},{"id":"OwnerName","type":"text"},{"id":"Contractor","type":"text"},{"id":"parcelId","type":"text"},{"id":"lat","type":"float"},{"id":"lng","type":"float"}]' | |
curl -v $CKAN_BASE_URL/api/3/action/datastore_create \ | |
-d '{"resource_id": "'$resource_id'", "fields": '$fields', "primary_key":"ID", "force":"true"}' \ | |
-H "Authorization: $CKAN_API_KEY" |
def format_leaf_collection(geo_json) | |
esri_formatted = JSON.parse(geo_json) | |
features = esri_formatted['features'].map do |feature| | |
properties = feature['attributes'] | |
title = "Hello! Leaf collection status in your area is now '#{properties['Status']}'." | |
title += " Collection dates are #{properties['Dates']}" if properties['Dates'] | |
{ | |
type: "Feature", | |
id: properties['OBJECTID'], |
other_subaccount_sid= | |
other_phone_sid= | |
citygram_subaccount_sid= | |
master_account_sid= | |
master_account_auth_token= | |
curl -XPOST "https://api.twilio.com/2010-04-01/Accounts/$other_subaccount_sid.json" \ | |
-d "Status=closed" \ | |
-u "$master_account_sid:$master_account_auth_token" |
// ==UserScript== | |
// @name annotate | |
// @namespace annotate | |
// @include http://getpocket.com/a/read/* | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js | |
// @require http://assets.annotateit.org/annotator/v1.2.5/annotator-full.min.js | |
// @resource UI_CSS http://assets.annotateit.org/annotator/v1.2.5/annotator.min.css | |
// @grant GM_addStyle | |
// @grant GM_getResourceText | |
// @run-at document-start |
I hereby claim:
To claim this, I am signing this object:
<a href="javascript:void(function () { | |
var jsCode = document.createElement('script'); | |
jsCode.setAttribute('src', 'https://gist.githubusercontent.com/eeeschwartz/7cb6dc00d6a7cba70e1e/raw/extract_harvest_notes.js'); | |
document.body.appendChild(jsCode); | |
}())">Extract Time</a> |