Skip to content

Instantly share code, notes, and snippets.

View varunity's full-sized avatar

Varun Baker varunity

View GitHub Profile
lng lat
-77.23399839 17.81211861
-77.22748512 17.87916797
-77.39642756 18.15838573
-77.22748512 17.87916797
-77.22748512 17.87916797
-77.42938422 18.15584892
-77.23275824 17.94182592
-77.23911423 17.97033912
-77.28727672 17.80754139
#!/usr/bin/python
import csv
import sys
import shapely.wkt
import geojson
csv.field_size_limit(sys.maxsize)
csvfile = open('in.csv', 'rb')
@varunity
varunity / SocialLFEPAuthDelegate.js
Last active December 1, 2015 18:59
Drupal LiveFyre Enterprise Authentication Delegate for Janrain integration
var authDelegate;
Livefyre.require(["auth","lfep-auth-delegate#0"],
function(auth, LFEPAuthDelegate) {
// create an LFEP Auth Delegate
var authDelegate = new LFEPAuthDelegate({
engageOpts: {
app: "example.auth.fyre.co"
}
});
// Delegate AppKit Auth actions to LFEP
@varunity
varunity / Contract Killer 3.md
Last active August 29, 2015 14:27
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

import csv
import json
with open('data.json') as data_file:
x = json.load(data_file)
f = csv.writer(open("20150425.csv", "wb+"))
# Optional CSV Header - uncomment if needed
#f.writerow(["name", "creditcard"])
@varunity
varunity / CallHarvestAPI.php
Last active August 29, 2015 14:07
PHP script to call HarvestAPI
<?php
// modified code from https://stackoverflow.com/questions/9802788/call-a-rest-api-in-php
// Method: POST, PUT, GET etc
// Data: array("param" => "value") ==> index.php?param=value
/*
//had to install php curl