Skip to content

Instantly share code, notes, and snippets.

Patrick Humpal phumpal

View GitHub Profile
phumpal / Gemfile
Last active Jun 23, 2020
A simple Sinatara app to proxy Airbrake webhooks to Google Hangout Chats
View Gemfile
source ''
gem 'hangouts-chat'
gem 'sinatra'
IanColdwater / twittermute.txt
Last active Jul 10, 2020
Here are some terms to mute on Twitter to clean your timeline up a bit.
View twittermute.txt
Mute these words in your settings here:
neomantra /
Last active Jun 5, 2020
Notes on running Redis with HPC techniques

High Performance Redis

In response to this brief blog entry, @antirez tweeted for some documentation on high-performance techniques for Redis. What I present here are general high-performance computing (HPC) techniques. The examples are oriented to Redis. but they work well for any program designed to be single- or worker-threaded and asynchronous (e.g. uses epoll).

The motivation for using these techniques is to maximize performance of our system and services. By isolating work, controlling memory, and other tuning, you can achieve significant reduction in latency and increase in throughput.

My perspective comes from the microcosm of my own bare-metal (vs VM), on-premises deployment. It might not be suitable for all scenarios, especially cloud deployments, as I have little experience with HPC there. After some discussion, maybe this can be adapted as [ documentation](

geerlingguy / aws-sts-token
Created Sep 19, 2018
AWS STS Token update playbook for MFA
View aws-sts-token
#!/usr/bin/env ansible-playbook -c local
# AWS STS token update playbook.
# Updating AWS session tokens with STS can be a pain. But MFA is good. So let's
# automate the management of the .aws/credentials file to make it not painful!
# Usage:
# 1. Save this to a file like /usr/local/bin/aws-sts-token
phumpal /
Last active Feb 21, 2020
A simple Sinatra app to proxy Airbrake webhooks to Cisco Spark Rooms


brew install jq # or apt-get install jq (only needed for testing)          
rvm install ruby-2.4.1
rvm gemset create spark
rvm gemset use spark
gem install cisco_spark --no-document
gem install sinatra --no-document
maddiesch /
Created Apr 23, 2017
Systemd Sidekiq Capistrano

Systemd managed Sidekiq

This assumes that sidekiq.service is located in <rails root>/lib/services/sidekiq.service

lesovsky / postrgesql-autovacuum-queue-detailed.sql
Created Apr 10, 2017
View postrgesql-autovacuum-queue-detailed.sql
WITH table_opts AS (
c.oid, c.relname, c.relfrozenxid, c.relminmxid, n.nspname, array_to_string(c.reloptions, '') AS relopts
FROM pg_class c
INNER JOIN pg_namespace n ON c.relnamespace = n.oid
WHERE c.relkind IN ('r', 't') AND n.nspname NOT IN ('pg_catalog', 'information_schema') AND n.nspname !~ '^pg_temp'
vacuum_settings AS (
oid, relname, nspname, relfrozenxid, relminmxid,

FWIW: I'm not the author of the content presented here (which is an outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.

Effective Engineer - Notes

What's an Effective Engineer?

cig0 /
Last active Oct 31, 2016
Migrating collections from a mongoDB 2.6 mmap database to Percona Server for mongoDB 3.0.8 wiredTiger
# Fixex the error 'Failed: restore error: listDB.lists: error creating collection \
# listDB.lists: error running create command: exception: specify size: when capped is true'
# Credits: Juan Pablo Nogueira,
grep -rl ', "capped" : { "$undefined" : true }, "size" : { "$undefined" : true }' \
/path/to/DB/to/be/restored/* | xargs sed -i 's/, "capped" : { "$undefined" : true }, \
"size" : { "$undefined" : true }//g'
xenophonf / ubuntu-14.04.3-macbookpro8,
Last active Aug 22, 2019
Dual-boot Mac OS X (FileVault2) and Ubuntu (OpenZFS/LUKS)
View ubuntu-14.04.3-macbookpro8,

Dual-boot Mac OS X (FileVault2) and Ubuntu (OpenZFS/LUKS)

This procedure results in a computer that runs both Mac OS X and Ubuntu in a dual-boot configuration, each operating system using full (whole) disk encryption, and with the Ubuntu root file system stored on a ZFS pool encrypted using LUKS. The specific hardware and software versions used to document this procedure are:

  • MacBookPro8,2
You can’t perform that action at this time.