Skip to content

Instantly share code, notes, and snippets.

View Stiivi's full-sized avatar

Stefan Urbanek Stiivi

View GitHub Profile
# Demo:
#
# Aggregate population per independence type for every year
# Sources: Population and Country Codes datasets
#
from bubbles import Pipeline
from bubbles import get_logger
logger = get_logger()
@postmodern
postmodern / comment.md
Last active January 11, 2024 15:37
Crypto Privacy Copy Pasta
anonymous
anonymous / gist:4418840
Created December 31, 2012 10:32
Type 1 slowly changing dimension – very simple example
-- Structure:
-- src_customers: id, name, address
-- dim_customers: id, name, address
-- Find new records
DROP TABLE IF EXISTS tmp_new;
CREATE TABLE tmp_new AS
@kroger
kroger / gist:3856845
Created October 9, 2012 05:45
The LaTeX style file used in Music for Geeks and Nerds
\usepackage{wasysym}
\usepackage{moresize}
\usepackage{multicol}
\usepackage[Sonny]{fncychap}
\usepackage[margin=1in, paperwidth=6.69in, paperheight=9.61in]{geometry}
\usepackage[protrusion=true,expansion=true]{microtype}
\usepackage{xltxtra}
\setmainfont[Mapping=tex-text]{Minion Pro}
\setmonofont[Mapping=tex-text,Scale=0.85]{Inconsolata}
%\setmonofont[Mapping=tex-text,Scale=0.75]{DejaVu Sans Mono}
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active March 27, 2024 06:33
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@jboner
jboner / latency.txt
Last active April 24, 2024 13:53
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@tobyhede
tobyhede / postsql.sql
Created May 17, 2012 03:08
PostgreSQL as JSON Document Store
-- PostgreSQL 9.2 beta (for the new JSON datatype)
-- You can actually use an earlier version and a TEXT type too
-- PL/V8 http://code.google.com/p/plv8js/wiki/PLV8
-- Inspired by
-- http://people.planetpostgresql.org/andrew/index.php?/archives/249-Using-PLV8-to-index-JSON.html
-- http://ssql-pgaustin.herokuapp.com/#1
-- JSON Types need to be mapped into corresponding PG types
--
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@bycpx
bycpx / config
Created October 13, 2010 19:07
Enable textual diff of iWork Pages documents.
[diff "iworkpages"]
textconv = xsltproc $GIT_DIR/Pages.xsl