Skip to content

Instantly share code, notes, and snippets.

@kyroskoh
kyroskoh / cartodb20_build.sh
Last active August 29, 2015 14:27 — forked from ohvitorino/cartodb20_build.sh
CartoDB installation on Ubuntu 12.04
###################################
## CartoDB 2.0 Install [Working] ##
## Tested on Ubuntu 12.04 ##
###################################
sudo apt-get update
sudo apt-get safe-upgrade -y
# Install miscellaneous dependencies packages
sudo apt-get install -y git-core python-software-properties openmpi-bin libopenmpi-dev build-essential libxslt-dev zlib1g-dev ruby gems unzip

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+C copy current line (if no selection)
Ctrl+X cut current line (if no selection)
Ctrl+⇧+K delete line
Ctrl+↩ insert line after
@kyroskoh
kyroskoh / install_postgresql9.3_postgis2.1_ubuntu.md
Last active August 29, 2015 14:27 — forked from hewerthomn/install_postgresql9.3_postgis2.1_ubuntu.md
Installing PostgreSQL 9.3 and PostGIS on Ubuntu 12.04

Remove old PostGIS Installation

The first step is to remove older version of PostGIS if any.

sudo apt-get purge postgis

Setup repository

wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" >> /etc/apt/sources.list.d/postgresql.list'
@kyroskoh
kyroskoh / gist:dbf8005f56d85a1284d4
Last active August 29, 2015 14:27 — forked from djq/gist:2846196
Install Postgres 9.1, PostGIS 2.0.2 and PG Routing on Ubuntu 12.04 (Precise Pangolin)
#!/bin/bash
#
# Install Postgres 9.1, PostGIS 2.0 and pgRouting on a clean Ubuntu 12.04 install (64 bit)
# updated to PostGIS 2.0.1
# basics
sudo apt-get install python-software-properties
sudo apt-add-repository ppa:sharpie/for-science # To get GEOS 3.3.3
# install the following pacakages
@kyroskoh
kyroskoh / app.js
Last active September 22, 2015 01:49 — forked from kapouer/app.js
express tilelive example
// Tile server using the node web framework Express (http://expressjs.com).
var app = require('express').createServer();
var tilelive = require('tilelive');
require('tilelive-mapnik').registerProtocols(tilelive);
var filename = __dirname + '/' + 'stylesheet.xml';
tilelive.load('mapnik://' + filename, function(err, source) {
if (err) throw err;
app.get('/:z/:x/:y.*', function(req, res) {
source.getTile(req.param('z'), req.param('x'), req.param('y'), function(err, tile, headers) {
// `err` is an error object when generation failed, otherwise null.
@kyroskoh
kyroskoh / README.md
Last active September 22, 2015 01:51 — forked from tristen/README.md
Two Maps

##Two Maps

Experiment in synching two maps together.

Contributors

@kyroskoh
kyroskoh / README.md
Last active September 22, 2015 01:53 — forked from tristen/README.md
Chaining
@kyroskoh
kyroskoh / app.js
Last active September 22, 2015 01:54 — forked from tristen/app.js
Basic Controls
var map;
var initMap = function() {
var template = 'http://{S}tile.openstreetmap.org/{Z}/{X}/{Y}.png';
var subdomains = ['', 'a.', 'b.', 'c.'];
var provider = new MM.TemplatedLayer(template, subdomains);
map = new MM.Map('map', provider, null, [
new MM.MouseWheelHandler(null, true)
]);
/**
* ================== angular-ios9-uiwebview.patch.js v1.1.1 ==================
*
* This patch works around iOS9 UIWebView regression that causes infinite digest
* errors in Angular.
*
* The patch can be applied to Angular 1.2.0 – 1.4.5. Newer versions of Angular
* have the workaround baked in.
*
* To apply this patch load/bundle this file with your application and add a
@kyroskoh
kyroskoh / angular-bc.js
Created September 25, 2015 02:49 — forked from IgorMinar/angular-bc.js
Angular: BC module for scope/controller separation
/**
* @license AngularJS
* (c) 2010-2012 AngularJS http://angularjs.org
* License: MIT
*/
/**
* Backward compatibility module for AngularJS
* @author Vojta Jina <vojta.jina@gmail.com>
*