Skip to content

Instantly share code, notes, and snippets.

rodricios /
Last active November 18, 2020 17:21
Flipboard's summarization algorithm, sort of
#!/usr/bin/env python
# -*- coding: utf-8 -*-
pip install networkx distance pattern
In Flipboard's article[1], they kindly divulge their interpretation
of the summarization technique called LexRank[2].
microadam / .jscsrc
Created April 24, 2014 19:46
Example .jscsrc
{ "excludeFiles":
[ "node_modules/**"
, "coverage"
, "requireLineFeedAtFileEnd": true
, "disallowMultipleLineBreaks": true
, "requireMultipleVarDecl": true
, "disallowEmptyBlocks": true
, "disallowSpaceAfterObjectKeys": true
, "disallowCommaBeforeLineBreak": true
aubricus /
Created February 24, 2014 08:48
Use pandoc to convert into .rst for Pypi
long_description = ''
import subprocess
import pandoc
process = subprocess.Popen(
['which pandoc'],
bertspaan /
Last active March 17, 2018 17:40
TileMill project and SQL script to generate map tiles as seen on

Buildings in the Netherlands by year of construction

Map can be seen on The map shows all 9,866,539 buildings in the Netherlands, shaded according to year of construction. Data from BAG, via CitySDK. Map made with TileMill by Bert Spaan, Waag Society, inspired by BKLYNR.

This README file explains how to get the data, create the map and export high-res PNG and PDF files.

Download and import BAG data

First, install PostgreSQL and PostGIS. To download and import the latest BAG data into a local database, you can use the data, tools and tutorials provided

padde /
Last active April 30, 2018 17:11
OpenVPN on Ubuntu 12.10 at DigitalOcean

OpenVPN on Ubuntu 12.10 at DigitalOcean

Install OpenVPN

sudo apt-get install openvpn

Generate Server Certificates

sudo cp -r /usr/share/doc/openvpn/examples/easy-rsa/2.0 /etc/openvpn/easy-rsa2

cd /etc/openvpn/easy-rsa2

adrianlee44 / bowserscript
Last active January 24, 2024 12:50
Bowser Script v1.0
;/lp/ ' '
]\p;l/k,l o
nguyenlocduy / omniauth.rb
Last active December 16, 2015 01:08
How to integrate SHIFT API ( to your Rails App. You should read SHIFT API Docs to understand the flow before implementing this.
# config/omniauth.rb
# this is OPTIONAL if you want user to login not through SHIFT Website
# Register our provider with the OmniAuth Gem
module OmniAuth
module Strategies
# tell OmniAuth to load our strategy
autoload :Shift, 'shift_strategy'
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 19, 2024 13:25
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname

tmux cheatsheet

As configured in my dotfiles.

start new:


start new with session name:

Sample PHP+Mongo app on Heroku

  1. Install any of the Mongo add-ons available at

  2. Vendor the Mongo driver with your application. You can download it here:

    Add it to a folder like "ext".