Skip to content

Instantly share code, notes, and snippets.

View coderholic's full-sized avatar

Ben Dowling coderholic

View GitHub Profile
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({appId: 'APP_ID', status: true, cookie: true, xfbml: true});
FB.api('/search?q=max&type=user', function(response) {
console.log(response);
});
</script>
@coderholic
coderholic / setup-statsd.sh
Created April 21, 2011 18:16 — forked from collegeman/setup-statsd.sh
Turn an Ubuntu 10.04 linode into a StatsD/Graphite server
# install git
sudo apt-get install g++ curl libssl-dev apache2-utils
sudo apt-get install git-core
# download the Node source, compile and install it
git clone https://github.com/joyent/node.git
cd node
./configure
make
sudo make install
# install the Node package manager for later use
@coderholic
coderholic / gist:971070
Created May 13, 2011 18:45
Github search scraping
/*
Usage: io github <query> [language]
io github django
io github coffeescript
To limit search results to a certain language:
io github django python
To see debug info:
io --debug github django
@coderholic
coderholic / gist:1143661
Created August 13, 2011 09:18
mitmproxy installation on OSX
sudo ARCHFLAGS="-arch i386" pip install urwid
git clone https://github.com/cortesi/mitmproxy.git
cd mitmproxy
sudo python setup.py install
cd ..
sudo rm -rf mitmproxy
>>> from django.db import connection
>>> connection.cursor().execute("SELECT nothing FROM non_existant_table")
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "...lib/python2.6/site-packages/django/db/backends/util.py", line 34, in execute
return self.cursor.execute(sql, params)
File "...lib/python2.6/site-packages/django/db/backends/mysql/base.py", line 86, in execute
return self.cursor.execute(query, args)
File "...lib/python2.6/site-packages/MySQLdb/cursors.py", line 174, in execute
self.errorhandler(self, exc, value)
@coderholic
coderholic / fips.csv
Last active June 1, 2016 18:10
FIPS codes
AA 00 ARUBA
AC 00 ANTIGUA AND BARBUDA
AC 01 Barbuda
AC 03 Saint George
AC 04 Saint John
AC 05 Saint Mary
AC 06 Saint Paul
AC 07 Saint Peter
AC 08 Saint Philip
AC 09 Redonda
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>welcome to ipinfo</title>
<style>
/* ----- Global Stuff ----- */
# Basic API example, does not require token
$ curl ipinfo.io/8.8.8.8
{
"ip": "8.8.8.8",
"hostname": "google-public-dns-a.google.com",
"city": "Mountain View",
"region": "California",
"country": "US",
"loc": "37.3860,-122.0840",
"postal": "94035",
This file has been truncated, but you can view the full file.
ip,name,domain,type,country
100.42.173.114,Douglas FastNet,douglasfast.net,business,US
100.42.175.0,Douglas FastNet,douglasfast.net,business,US
100.42.175.134,Douglas FastNet,douglasfast.net,business,US
100.42.88.41,"Evertek, Inc",evertek.net,business,US
100.42.92.44,"Evertek, Inc",evertek.net,business,US
100.43.197.242,Star Pacific Rim Industries,telepacific.net,hosting,US
100.43.202.0,Century West Development,rentcwp.com,hosting,US
100.43.202.188,TPx Communications,tpx.com,hosting,US
100.43.215.242,TPx Communications,tpx.com,hosting,US
We can't make this file beautiful and searchable because it's too large.
range,matched_range,id,name,org,country,status,tech,maintainer,admin,whois_domain,source,updated,geoloc,rdns_domain,inferred_domain,org_address,asn,as_name,as_domain,asn_type
63.234.47.120/29,63.234.47.120/29,Q0324-63-234-47-120,1ST ADVANTAGE BANK,SAB-32,US,REASSIGNMENT,SHORE13-ARIN,"",SHORE13-ARIN,,arin,2017-03-24,"",qwest.net,1stadvantagebank.com,"240 SALT LICK RD, SAINT PETERS, MO, US, 63376",AS209,"Qwest Communications Company, LLC",centurylink.com,isp
184.80.244.12/30,184.80.244.12/30,184-80-244-12,1ST BANK & TRUST,C06915239,US,REASSIGNMENT,"","","",,arin,2018-03-05,"",,,"4668 BATTIEST PICKENS RD, BROKEN BOW, OK, US, 74728",AS7029,Windstream Communications LLC,windstream.com,isp
216.185.175.224/28,216.185.175.224/28,NET-216-185-175-224-28,1st Bank Yuma,C01585912,US,REASSIGNMENT,"","","",,arin,2007-03-06,"",mtntel.net,1stbankyuma.com,"2799 S. 4th Avenue, Yuma, AZ, US, 85364",AS7385,"Integra Telecom, Inc.",electriclightwave.com,hosting
64.136.241.28/30,64.136.241.28/30,CTSC-S1327,1st Source Bank,C06469049,