Skip to content

Instantly share code, notes, and snippets.

Patrick Humpal phumpal

Block or report user

Report or block phumpal

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
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


FWIW: I didn't produce the content presented here (the 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
phumpal /
Last active Mar 16, 2018
Install CoreOS on Hetzner w/hardware RAID1

CoreOS on Hetzner w/hardware RADI1

The existing docs when attempting to install CoreOS on Hetzner are a bit incomplete. This caused a bit of frustration for me so I am putting this doc together in hopes that it will help someone else.


After ordering your server you will need to log into the Hetzner server console

Add a public key

maxivak /
Last active Sep 16, 2019
Sending emails with ActionMailer and Sidekiq

Sending emails with ActionMailer and Sidekiq

Send email asynchroniously using Sidekiq.


Create your mailer us usual:

0XDE57 /
Last active Sep 17, 2019
Firefox about:config privacy settings


about:config settings to harden the Firefox browser. Privacy and performance enhancements.
To change these settings type 'about:config' in the url bar. Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and rendering normally. Some settings may also make firefox unstable.

I am not liable for any damages/loss of data.

Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions (HTTPS Everywhere, NoScript/Request Policy, uBlock origin, agent spoofing, Privacy Badger etc), and all plugins set to "Ask To Activate".

View S3FixExistingMedia.php
ini_set('display_errors', 1);
/* ======================================================
This script is NOT FULLY TESTED (not tested on Windows Server either)
USE AT YOUR OWN RISK - development environment Ubuntu Linux 14.04.3 LTS
The purpose of this script is for small websites and blogs
omame /
Created Apr 1, 2015
Send ZFS Linux metrics to statsd
# A port of ZFS stats for FreeBSD plugin to Linux, adapted to send metrics to statsd.
# Author: Daniele Valeriani <>
# Author of the original munin plugin: David Bjornsson <>
# Author of the Linux port: Alex Chistyakov <>
johanneslamers / craftcms_varnish.vcl
Last active Feb 26, 2019 — forked from aelvan/gist:eba03969f91c1bd51c40
Varnish 4.0 file for our Craft CMS projects
View craftcms_varnish.vcl
# Varnish 4.0 file for our Craft CMS projects
# Based on
# This is still work in progress, comments appreciated.
vcl 4.0;
import std;
import directors;
You can’t perform that action at this time.