Skip to content

Instantly share code, notes, and snippets.

@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 <[email protected]>
*
@kyroskoh
kyroskoh / scratch5
Created September 25, 2015 02:49 — forked from IgorMinar/scratch5
/// bootstrap code
var myApp = angular.module('myApp', []);
//// resource def
var pops;
pops = function($resource) {
return $resource('/pops/:id', {}, {
------------------------------------------------------------------------------------------------------------------------------
DESCRIPTION:
Notes for deploying TileStream on an AWS EC2 Ubuntu 12.04.2 Server for development. Includes workflow for creating
a local tile cache with TileMill, connecting to your Ubuntu EC2 server via SSH using Mac OSX Terminal, and uploading
your tiles (.mbtiles) to your TileStream server.
REFERENCES:
TileStream git repo: https://github.com/mapbox/tilestream
-----------------------------------------------------------------------------------------------------------------------------
@kyroskoh
kyroskoh / docker.sh
Created November 9, 2015 06:50
Docker.sh
#!/bin/sh
set -e
#
# This script is meant for quick & easy install via:
# 'curl -sSL https://get.docker.com/ | sh'
# or:
# 'wget -qO- https://get.docker.com/ | sh'
#
# For test builds (ie. release candidates):
# 'curl -sSL https://test.docker.com/ | sh'
@kyroskoh
kyroskoh / nginx.conf
Created November 24, 2015 02:27 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@kyroskoh
kyroskoh / nginx-latest.sh
Last active December 8, 2015 10:07 — forked from Globegitter/nginx-latest.sh
Install the latest nginx from source for Ubuntu 14.04
#Downloading OpenSSL:
wget http://www.openssl.org/source/openssl-1.0.1g.tar.gz
#Extracting files from the downloaded package:
tar -xvzf openssl-1.0.1g.tar.gz
#Configuring OpenSSL:
./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl
#Compiling OpenSSL:
@kyroskoh
kyroskoh / install-tmux
Created February 6, 2016 05:09 — forked from rothgar/install-tmux
Install tmux 1.9 on rhel/centos 6
# Install tmux on Centos release 6.5
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -OL https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
tar -xvzf libevent-2.0.21-stable.tar.gz
cd libevent-2.0.21-stable
./configure --prefix=/usr/local
@kyroskoh
kyroskoh / tmux-1.8-on-CentOS-6.x.txt
Created February 6, 2016 05:09 — forked from sturadnidge/tmux-1.8-on-CentOS-6.x.txt
Install tmux 1.8 on CentOS 6.x minimal (64bit)
# download latest libevent2 and tmux sources, and extract them somewhere
# (thx bluejedi for tip on latest tmux URL)
#
# at the time of writing:
# https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
# http://sourceforge.net/projects/tmux/files/latest/download?source=files
#
# install deps
yum install gcc kernel-devel make ncurses-devel