Skip to content

Instantly share code, notes, and snippets.

View geohacker's full-sized avatar

Sajjad Anwar geohacker

View GitHub Profile
@geohacker
geohacker / gist:1605407
Created January 13, 2012 10:18
cloudmade_layer
var map = new L.Map('map');
var cloudmadeUrl = 'http://{s}.tile.cloudmade.com/API-KEY/997/256/{z}/{x}/{y}.png',
cloudmadeAttrib = 'Map data © 2011 OpenStreetMap contributors, Imagery © 2011 CloudMade',
cloudmade = new L.TileLayer(cloudmadeUrl, {maxZoom: 18, attribution: cloudmadeAttrib});
@geohacker
geohacker / gist:1605424
Created January 13, 2012 10:24
mapquest_layer
var map = new L.Map('map');
var mapquestUrl = 'http://{s}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png',
subDomains = ['otile1','otile2','otile3','otile4'],
mapquestAttrib = 'Data, imagery and map information provided by <a href="http://open.mapquest.co.uk" target="_blank">MapQuest</a>,
<a href="http://www.openstreetmap.org/" target="_blank">OpenStreetMap</a> and contributors.
var mapquest = new L.TileLayer(mapquestUrl, {maxZoom: 18, attribution: mapquestAttrib, subdomains: subDomains});
@geohacker
geohacker / index.html
Last active December 10, 2015 16:48 — forked from mbostock/.block
<html>
<head>
<title>Bar Chart</title>
<script type="text/javascript" src="http://github.com/mbostock/d3/raw/v1.8.2/d3.js"></script>
<style type="text/css">
body {
font: 10px sans-serif;
}
@geohacker
geohacker / home.geojson
Last active January 27, 2017 09:40
I've finally arrived in Bangalore
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@geohacker
geohacker / champions.json
Created September 3, 2013 08:39
Champions Map
{"features":[{"id":"V.Jayalakshmi","properties":{"Name":"V.Jayalakshmi","Number of sessions":1,"State":"Tamil Nadu","City ":"Sathyamangalam","geo_longitude":77.276,"geo_latitude":11.5845},"type":"Feature","geometry":{"type":"Point","coordinates":[77.276,11.5845]}},{"id":"Shailendra Singh","properties":{"Name":"Shailendra Singh","Number of sessions":1,"State":"New Delhi","City ":"New Delhi","geo_longitude":77.2159562,"geo_latitude":28.6138967},"type":"Feature","geometry":{"type":"Point","coordinates":[77.2159562,28.6138967]}},{"id":"R.S. Mathur","properties":{"Name":"R.S. Mathur","Number of sessions":1,"State":"New Delhi","City ":"New Delhi","geo_longitude":77.2159562,"geo_latitude":28.6138967},"type":"Feature","geometry":{"type":"Point","coordinates":[77.2159562,28.6138967]}},{"id":"Chandan Borthakur","properties":{"Name":"Chandan Borthakur","Number of sessions":1,"State":"Assam","City ":"Gohpur","geo_longitude":93.6323048,"geo_latitude":26.8879397},"type":"Feature","geometry":{"type":"Point","coordinates":[9
@geohacker
geohacker / map.geojson
Created September 3, 2013 08:48
via:geojson.io
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@geohacker
geohacker / homibhabha.md
Last active January 2, 2016 16:19
Outline for the session at Homi Bhabha Center, Bombay.
  1. Basic intro to web development: 15 mins

  2. What happens with an HTTP request

  3. 10 minute history of web standards / HTML. first page on the internet * Markup language + CSS + Javascript * Browser wars, html 4.0, etc. * From pages to apps - HTML 5 / Web Apps 1.0

  4. Evolution of Javascript: 10 mins

  5. from "DHTML" tor jQuery to complex web apps and 10,000 javascript frame-works.

Add this to ~/.profile -

export LANGUAGE="en_US.UTF-8"
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
  1. Run source ~/.profile
  2. sudo su postgres psql
  3. update pg_database set datistemplate=false where datname='template1';
@geohacker
geohacker / string.md
Last active August 29, 2015 13:56
String Matching Jugaad.
@geohacker
geohacker / georeferencing101.md
Last active February 24, 2021 07:51
Georeferencing 101 - Images to Spatial Data.

Outline

  1. What is Georeferencing? And Why?
  2. Ground Control Points.
  3. Tools. 1. GIMP 2. Inkscape 3. QGIS
  4. Raster data.
  5. Process