Skip to content

Instantly share code, notes, and snippets.

/**
* Return a timestamp with the format "m/d/yy h:MM:ss TT"
* @type {Date}
*/
function timeStamp() {
// Create a date object with the current time
var now = new Date();
// Create an array with the current month, day and time
var chartHeight;
var chartWidth;
// ceiling value; needs to be set
var ceiling;
// Y scale will fit values from 0-10 within pixels 0 - height
var y;
var yneg;
/**
@mattfullerton
mattfullerton / README.md
Created March 21, 2014 20:52
trajectories - README is empty

README is empty

@mattfullerton
mattfullerton / multiviewtest.html
Created August 12, 2014 07:45
Failing Recline MultiView Grid+Map
<!DOCTYPE html>
<html lang="en">
<head>
<!-- you do not have to use bootstrap but we use it by default -->
<link href="vendor/bootstrap/2.3.2/css/bootstrap.css" rel="stylesheet">
<!-- css -->
<link href="vendor/leaflet/0.4.4/leaflet.css" rel="stylesheet">
<!--[if lte IE 8]>
<link rel="stylesheet" href="vendor/leaflet/0.4.4/leaflet.ie.css" />
@mattfullerton
mattfullerton / README.md
Created February 19, 2015 13:27
anprlocations

README is empty

@mattfullerton
mattfullerton / getallckanresources.py
Created June 11, 2015 07:44
Download all resources from a CKAN
import urllib, urllib2, json
baseurl = 'https://yourckanurl.com'
apikey = None # Set to something else if using private datasets
print 'Downloading ' + baseurl + "/api/3/action/current_package_list_with_resources..."
request = urllib2.Request(baseurl +'/api/3/action/current_package_list_with_resources')
if apikey != None: