Skip to content

Instantly share code, notes, and snippets.

View philippkeller's full-sized avatar

Philipp Keller philippkeller

View GitHub Profile
@behrends
behrends / private.xml
Created July 5, 2012 09:23
Easy access to Umlauts on MacOS X using KeyRemap4MacBook
<?xml version="1.0"?>
<root>
<item>
<name>Easy access for Umlauts</name>
<identifier>private.easy_umlaut_access</identifier>
<autogen>
--KeyToKey--
KeyCode::A, ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L,
KeyCode::U, ModifierFlag::OPTION_L, KeyCode::A, ModifierFlag::SHIFT_L
</autogen>
"""Build an .xls file with all background colors vs patterns possibilities"""
import xlwt
wb = xlwt.Workbook()
ws = wb.add_sheet("Colors")
ws.write(0, 0, "Colors/Patterns")
for pat_index in range(0, 16):
ws.write(0, pat_index + 1, str(pat_index))
@Frobitz
Frobitz / coffeescript-homebrew
Created August 4, 2012 13:32
Install CoffeeScript with Homebrew on OS X 10.8 Mountain Lion
# Install Homebrew
ruby <(curl -fsSk https://raw.github.com/mxcl/homebrew/go)
# Follow on-screen instructions (X11 isn't necessary for this if it shows as not installed)
brew install node
# Open .bashrc and add this line (create .bashrc if its not in your home directory already)
@LouisAmon
LouisAmon / shovel.py
Created July 5, 2017 05:06 — forked from jdmaturen/shovel.py
SQS + Boto + Eventlet, re http://gist.github.com/434053
(jd@XXX) /home/jd/shovel> time ./shovel.py jd_test
got 901 messages
real 0m1.617s
user 0m0.558s
sys 0m0.044s
@JeffBelgum
JeffBelgum / list_comprehensions.rs
Created September 26, 2014 00:03
Python list comprehensions in Rust
#![feature(macro_rules)]
/// MIT license etc. etc.
///
/// Experimenting with Python-like list comprehensions.
///
/// An attempt to explore the possibility space for ergonomic improvements
/// in Rust that can come post v1.0. Notice that there are not type declerations.
/// Aside from the "c!" macro invocation, Rust allows for an exact copy of the
/// Python comprehension syntax.
@P7h
P7h / tmux__CentOS__build_from_source.sh
Last active November 22, 2023 11:28
tmux 2.0 and tmux 2.3 installation steps for Ubuntu. Or build from tmux source v2.5 for Ubuntu and CentOS.
# Steps to build and install tmux from source.
# Takes < 25 seconds on EC2 env [even on a low-end config instance].
VERSION=2.7
sudo yum -y remove tmux
sudo yum -y install wget tar libevent-devel ncurses-devel
wget https://github.com/tmux/tmux/releases/download/${VERSION}/tmux-${VERSION}.tar.gz
tar xzf tmux-${VERSION}.tar.gz
rm -f tmux-${VERSION}.tar.gz
cd tmux-${VERSION}
@capocasa
capocasa / postgres-database-setup
Last active January 1, 2024 12:36
Triple-Redundant Hetzner Debian postgres setup
##### This is how to set up a triple redundant postgres.
##### Use a main box on Hetzner, a secondary small box on Hetzner in a
##### different datacenter for query replication, and a Hetzner Storage-Box
##### for file replication.
##### There will always be two copies of the data in different datacenters by the time
##### the transaction completes.
##### Here, Wireguard is used to have an internal network between the two hosts,
##### but Hetzner networks could also be used. SSH access between the two boxes