Instantly share code, notes, and snippets.

View 2014-09-30-sample.rb = 'Person Name <>'
message.subject = 'Sample Subject'
# body is probably good enough, but you can set text_part/html_part below if you like
message.body = <<HERE.strip
This is a sample
View dontforget.bash
# dontforget
# A stupid script for short term reminders in bash
# Arguments just need to contain a number and a bunch of words.
# The number can be anywhere in the arguments, but there shouldn't
# be any other numeric digits.
View _dev_badge.html.slim
/ In app/views/shared/
span= Rails.env
span It ain't production!
View sidekiq_with_github.rb
require 'warden/github'
class SidekiqGithubChecker
def self.registered(app)
app.helpers do
def warden; env['warden'] end
def github_organization_authenticate!(name)
unless warden.user.organization_member?(name)
halt [401, {}, ["You don't have access to organization #{name}"]]

A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


View all_aws_lambda_modules.txt
# module list (generated by
# timestamp='20160226T200954Z'
# sys.version='2.7.10 (default, Dec 8 2015, 18:25:23) \n[GCC 4.8.3 20140911 (Red Hat 4.8.3-9)]'
# sys.platform='linux2'
# platform='Linux-4.1.13-19.31.amzn1.x86_64-x86_64-with-glibc2.2.5'
set -u # Check unset variables only
#set -ue # Check unset variables. Exit on error
# Trap signals
trap_HUP() {
echo "Trap HUP signal."
exit 1
# Two things are important to note:
# 1) The code is fugly, because it was a JavaScript/iPad experiment.
# I know that it is ugly, so pretty please don't comment on that part.
# 2) I tried to use as many CoffeeScript features as possible,
# including but not limited to list comprehensions,
# heredocs, destructuring assignment and also the "do" operator
# I welcome comments about stuff that is not CoffeeScripty enough, or what I should
# write differently.

GeoPlanet data with ancestor chain cache imported in 10 minutes

Yahoo! provides its GeoPlanet data as three separate TSV files, available for download here.

That's a database with some 17 million records:

  • 5.7 million records: locations (aka places).
  • 2.2 million records: alternative names for each place (aka aliases).
  • 9.6 million records: matrix of neighbourhoods per place (aka adjacencies).