Skip to content

Instantly share code, notes, and snippets.

Knight1 /
Last active May 3, 2018
Check availability of specific server type in every location and ~💵 not collected per month
#Usage: default is Type 2a. If you wish another server type use ./ 1/2/3
#Obtain api key here =>
if [[ -z ${1+x} ]]; then
yhahn / marker.png
Last active Aug 29, 2015
mapnik markersnapping testcase
kkaefer /
Created Jun 16, 2014
Faster SublimeClang by using Xcode's libclang.dylib
#!/usr/bin/env bash
# Credits go to Dennis Luxen (
pushd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/SublimeClang/internals/
cp /Applications/ .
cd ../src/build
trevnorris /
Last active Jul 21, 2021
Quick steps of how to create a flame graph using perf

The will setup the latest Node and install the latest perf version on your Linux box.

When you want to generate the flame graph, run the following (folder locations taken from install script):

sudo sysctl kernel.kptr_restrict=0
# May also have to do the following:
# (additional reading )
sudo sysctl kernel.perf_event_paranoid=0
View -
setopt autopushd pushdsilent
fpath=(/usr/local/share/zsh-completions $fpath)
autoload -U colors && colors
autoload -U compinit promptinit

Context: a class of 10 9th-12th graders doing a week-long class on HTML, CSS, and JavaScript.

The question of an editor. While we stay in guided environments like jsbin & for the first two days of class, in order to save to files and tinker, we eventually need to ‘save to disk’ to view things as real websites and understand how code works.

I use vim personally, but know very well that it’s a tough place to start for students, and would be a dangerous distraction from the topics.

What really matters for an editor in this setting:

  1. It should be simple to use. This means keystrokes do what they do in other programs, like Word.
  2. It should not crash.
tibordp /
Last active Dec 30, 2022
A simple variant type implementation in C++
#include <iostream>
#include <utility>
#include <typeinfo>
#include <type_traits>
#include <string>
template <size_t arg1, size_t ... others>
struct static_max;
template <size_t arg>
View Topojson install
1. Install Anaconda to get your python 2.7.
2. Install .Net Framework - dotNetFx45_Full_setup.exe
3. Uninstall the Microsoft Visual C++ 2010 instances.
4. Install the Microsoft SDK - winsdk_web.exe #
5. Install Node.js -
6. Open your command prompt as an administrator
>"cmd" in Search for All Programs
>Ctrl-RightClick on CMD and "Run as Administrator"
7. Set your environment for the SDK (this was tricky to figure out!)
pnorman /
Last active Sep 15, 2019
Draft install instructions for osm2pgsql + carto + renderd

Manually building a tile server

This page describes how to install, setup and configure all the necessary software to operate your own tile server. The step-by-step instructions are written for Ubuntu Linux 12.04 LTS (Precise Pangolin), however they should transfer fairly straightforwardly to other versions of Ubuntu or Linux distributions.

##Software installation The OSM tile server stack is a collection of programs and libraries that work together to create a tile server. As so often with OpenStreetMap, there are many ways to achieve this goal and nearly all of the components have alternatives that have various specific advantages and disadvantages. This tutorial describes the most standard version that is also used on the main tile server.

This guide covers installation of osm2pgsql, loading a PostgreSQL/PostGIS database, and rendering tiles for an online webmap.The database can also be used to [develop stylesheets], or render data with other software.

Before starting you want t

zeke /
Last active Dec 17, 2015
A brutish migration script from Tumblr posts to Jekyll-friendly markdown files.
# Change this to your blog URL...
export TUMBLR_URL=""
# As of this writing, jekyll and jekyll-import are busted. :(
gem uninstall jekyll -aIx
# Install an old version of jekyll that includes a migration script
gem install jekyll -v 0.11.2
# Install a python package that converts HTML to Markdown