Skip to content

Instantly share code, notes, and snippets.

View netconstructor's full-sized avatar
💭
pushing pixels

Christian Hochfilzer netconstructor

💭
pushing pixels
View GitHub Profile
.DS_Store
*.log
Gemfile.lock
@netconstructor
netconstructor / .gitignore
Created December 9, 2012 20:42 — forked from karmi/.gitignore
Import your Gmail messages into ElasticSearch and search them with a simple web application.
.DS_Store
*.log
Gemfile.lock
@netconstructor
netconstructor / gist:4243478
Created December 9, 2012 05:40 — forked from wesbos/gist:1476820
PhantomJS Screenshot
var page = new WebPage(),
address, output, size;
address = "http://www.metachunk.com/";
width = 1024; height = 600;
output = "./screenshots/wat-"+width+"X"+height+".png";
page.viewportSize = { width: width, height: height };
if (phantom.args.length === 3 && phantom.args[1].substr(-4) === ".pdf") {
@netconstructor
netconstructor / .gitignore
Created December 8, 2012 10:53 — forked from karmi/.gitignore
Import your Gmail messages into ElasticSearch and search them with a simple web application.
.DS_Store
*.log
Gemfile.lock
@netconstructor
netconstructor / gist:4072557
Created November 14, 2012 14:52 — forked from jatorre/gist:3891312
Calculating Stratos distances
//Furthest distance travelled from start point. // http://javi.cartodb.com/api/v2/sql?q=
WITH points AS
(SELECT
(SELECT (the_geom) FROM stratos ORDER BY id ASC LIMIT 1) as p1,
(SELECT (the_geom) FROM stratos
WHERE ST_x(the_geom)<180 AND ST_x(the_geom)>-180 AND ST_x(the_geom)<>0
AND ST_x(the_geom)<>0 ORDER BY ST_Distance(the_geom,(SELECT the_geom
FROM stratos ORDER BY id ASC LIMIT 1)) DESC LIMIT 1) as p2
)
SELECT ST_distance(p1::geography,p2::geography) as furthest_distance FROM points
@netconstructor
netconstructor / redbullstratos_cartodb.py
Created November 14, 2012 14:51 — forked from javisantana/redbullstratos_cartodb.py
script used to feed cartodb with the redbull stratos mission info
import time
import urllib2
import json
from cartodb import CartoDBAPIKey, CartoDBException
from secret import API_KEY
URL = 'http://services.redbullstratos.com/LiveData/Get'
cl = CartoDBAPIKey(API_KEY, 'javi')
@netconstructor
netconstructor / gist:4045342
Created November 9, 2012 11:53 — forked from ianAndrewClark/gist:1171014
location mapping, with settings
{
"mappings": {
"locations": {
"properties": {
"recordId": {
"type": "long"
},
"namePlain": {
"type": "string",
"store": "no",
@netconstructor
netconstructor / .gitignore
Created November 1, 2012 09:42 — forked from karmi/.gitignore
Import your Gmail messages into ElasticSearch and search them with a simple web application.
.DS_Store
*.log
Gemfile.lock
@netconstructor
netconstructor / resource-view-demo-data.py
Created October 30, 2012 07:49 — forked from rufuspollock/resource-view-demo-data.py
Script to Create Demo Resources for Testing Resource Viewer
'''Simple script for creating demo data in CKAN
Requires existence of a tester user. You can create this by doing::
paster create-test-data user
'''
import ckanclient
base_location = 'http://localhost:5000/api'
api_key = 'tester'