Skip to content

Instantly share code, notes, and snippets.

View ddol's full-sized avatar

David Dolphin ddol

View GitHub Profile
@ddol
ddol / sample
Created June 10, 2015 18:06
JSON stub
{
"airbnb_user_id": 624464,
"ldap_id": "david_dolphin",
"genesys_user_name": "david.dolphin@airbnb.com.agent",
"genesys_employee_id": "david_dolphin_agent",
"is_active": true
}
@ddol
ddol / gist:3880919
Created October 12, 2012 19:12
Some unusual domains that CBS owns
tempest:~ david$ dig +nocmd -f /tmp/domains NS +noall +answer
aryanidentity.com. 1741 IN NS ns1.cbsig.net.
aryanidentity.com. 1741 IN NS ns4.cbsig.net.
aryanidentity.com. 1741 IN NS ns5.cbsig.net.
aryanidentity.com. 1741 IN NS ns2.cbsig.net.
canadiansexacts.org. 2514 IN NS ns1.cbsig.net.
canadiansexacts.org. 2514 IN NS ns2.cbsig.net.
canadiansexacts.org. 2514 IN NS ns5.cbsig.net.
canadiansexacts.org. 2514 IN NS ns4.cbsig.net.
genetic-monitor.com. 2823 IN NS ns4.cbsig.net.
@ddol
ddol / gist:1445736
Created December 8, 2011 01:51
TLDs with MX records
ai. 14170 IN MX 10 mail.offshore.ai. ;; Anguilla
as. 21371 IN MX 10 cmh.relay.gdns.net. ;; American Samoa
as. 21371 IN MX 10 dca.relay.gdns.net. ;; American Samoa
bj. 86176 IN MX 20 mail6.domain-mail.com. ;; Benin
cf. 3379 IN MX 10 mail.intnet.cf. ;; Central African Republic
dj. 345488 IN MX 5 relais2.intnet.dj. ;; Djibouti
@ddol
ddol / gist:1441570
Created December 7, 2011 05:23
Flatten and re-inflate an n-dimensional nested object
mush = function(){
/* Author: David Dolphin (ddol)
*
* Use this however you see fit, for any reason without attribution. If it works for you, great!
*
* I wrote this so I could (un)pack settings from fancy-settings[1] for settings that contained nested objects.
* This is necessary because Chrome's localStorage is a simple key, value store and does not support nesting.
* To be used in conjunction with .toObject() and .fromObject()
*
* [1] https://github.com/frankkohlhepp/fancy-settings
@ddol
ddol / gist:924242
Created April 17, 2011 17:10
MongoDB Map/Recuce with stored JavaScript
db.pings.mapReduce("function(){cidmap.apply(this);}", "function(k,v){return cidred(k,v);}", {out: { replace : "cidmr"} } )