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 / Real-time-frequency-analysis-of-streaming-audio-data-main.js
Created September 15, 2015 06:52
Real-time-frequency-analysis-of-streaming-audio-data-main.js
$(function () {
// Future-proofing...
var context;
if (typeof AudioContext !== "undefined") {
context = new AudioContext();
} else if (typeof webkitAudioContext !== "undefined") {
context = new webkitAudioContext();
} else {
$(".hideIfNoApi").hide();
$(".showIfNoApi").show();
@kyroskoh
kyroskoh / giacomo2.html
Last active September 16, 2015 03:12
2 Maps: Create Viz
<!DOCTYPE html>
<html>
<head>
<title>2 Maps: Create Viz</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<link rel="shortcut icon" href="http://cartodb.com/assets/favicon.ico" />
<link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v3/themes/css/cartodb.css" />
<style>
@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