Skip to content

Instantly share code, notes, and snippets.

View naveen's full-sized avatar

naveen naveen

View GitHub Profile
@naveen
naveen / linode-debian-initial
Created June 10, 2013 23:47
getting up and going on linode with debian 6
ssh root@_
echo "kitsune" > /etc/hostname
hostname -F /etc/hostname
to /etc/hosts:
12.34.56.78 plato.example.com plato
2600:3c01::a123:b456:c789:d012 plato.example.com plato
dpkg-reconfigure tzdata
@naveen
naveen / afconvert-wav-caf.sh
Created May 23, 2013 16:41
convert a wav into a caf suitable for ios push.
afconvert ~/Desktop/reminder.wav ~/Desktop/reminder.caf -d ima4 -f caff -v
@naveen
naveen / UIWebView-intercept.m
Last active December 16, 2015 15:19
intercept custom JS handlers and inject custom HTTP headers in a UIWebView
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
{
BOOL headersArePresent = [[request allHTTPHeaderFields] objectForKey:@"X-Custom-Timezone"] != nil;
if (!headersArePresent) {
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
dispatch_async(dispatch_get_main_queue(), ^{
NSURL *url = [request URL];
if ([[url scheme] isEqualToString:@"customjs"]) {
// parse the rest of the URL object and execute functions
@naveen
naveen / gist:d8da2facaf8c5391c90e
Created November 13, 2014 14:40
onename.io/naveen
Verifying that +naveen is my openname (Bitcoin username). https://onename.io/naveen
@naveen
naveen / naveen-citibike-trips-20140815
Created September 18, 2014 19:31
naveen citibike trips 20140815
start_station,start_station_lat,start_station_lon,start_time,end_station,end_station_lat,end_station_lon,end_time,actual_duration,estimated_duration,estimated_distance
Great Jones St,40.72743423,-73.99379025,6/30/14 10:30:27 AM,Cleveland Pl & Spring St,40.7218158,-73.99720307,6/30/14 10:34:23 AM,236.0,417,1562
Cleveland Pl & Spring St,40.7218158,-73.99720307,6/30/14 8:55:28 AM,Great Jones St,40.72743423,-73.99379025,6/30/14 8:58:33 AM,185.0,199,704
Great Jones St,40.72743423,-73.99379025,6/26/14 11:36:57 PM,Cleveland Pl & Spring St,40.7218158,-73.99720307,6/26/14 11:41:38 PM,281.0,417,1562
Great Jones St,40.72743423,-73.99379025,6/26/14 6:10:45 PM,Cleveland Pl & Spring St,40.7218158,-73.99720307,6/26/14 6:16:44 PM,359.0,417,1562
Cleveland Pl & Spring St,40.7218158,-73.99720307,6/26/14 5:01:41 PM,Great Jones St,40.72743423,-73.99379025,6/26/14 5:06:05 PM,264.0,199,704
Broadway & E 14 St,40.73454567,-73.99074142,6/24/14 3:14:29 PM,Cleveland Pl & Spring St,40.7218158,-73.99720307,6/24/14 3:24:47 PM,618.0,432,168
@naveen
naveen / keybase.md
Created March 24, 2014 20:53
keybase.md

Keybase proof

I hereby claim:

  • I am naveen on github.
  • I am naveen (https://keybase.io/naveen) on keybase.
  • I have a public key whose fingerprint is DEB2 4190 A5A4 5E4C 61B0 9C7E DCEB 3B72 958C DB81

To claim this, I am signing this object:

@naveen
naveen / everyplacemap.html
Created February 8, 2014 22:47
every place i've been map.
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>every place i've been.</title>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' />
<script src='http://api.tiles.mapbox.com/mapbox.js/v1.5.2/mapbox.js'></script>
<link href='http://api.tiles.mapbox.com/mapbox.js/v1.5.2/mapbox.css' rel='stylesheet' />