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
maddiesch / README.md
Created Apr 23, 2017
Systemd Sidekiq Capistrano
View README.md

Systemd managed Sidekiq

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

View Effective_Engineer.md

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
cig0 / grep-mongodb-magic.sh
Last active Oct 31, 2016
Migrating collections from a mongoDB 2.6 mmap database to Percona Server for mongoDB 3.0.8 wiredTiger
View grep-mongodb-magic.sh
# 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, https://ar.linkedin.com/in/juan-pablo-nogueira-30645514/en
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
xenophonf / ubuntu-14.04.3-macbookpro8,2-openzfs-luks-refind.md
Last active Aug 22, 2019
Dual-boot Mac OS X (FileVault2) and Ubuntu (OpenZFS/LUKS)
View ubuntu-14.04.3-macbookpro8,2-openzfs-luks-refind.md

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
phumpal / README.md
Last active Mar 16, 2018
Install CoreOS on Hetzner w/hardware RAID1
View README.md

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.

Pre-requisites

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

Add a public key

@maxivak
maxivak / 00.md
Last active Sep 16, 2019
Sending emails with ActionMailer and Sidekiq
View 00.md

Sending emails with ActionMailer and Sidekiq

Send email asynchroniously using Sidekiq.

ActionMailer

Create your mailer us usual:

@0XDE57
0XDE57 / config.md
Last active Sep 17, 2019
Firefox about:config privacy settings
View config.md

ABOUT

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
<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
/* ======================================================
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
omame / zfs-arc-statsd.sh
Created Apr 1, 2015
Send ZFS Linux metrics to statsd
View zfs-arc-statsd.sh
#!/bin/bash
# A port of ZFS stats for FreeBSD plugin to Linux, adapted to send metrics to statsd.
#
# Author: Daniele Valeriani <daniele@valeriani.co.uk>
# Author of the original munin plugin: David Bjornsson <dabb@lolnet.is>
# Author of the Linux port: Alex Chistyakov <alexclear@gmail.com>
PREFIX="servers.`hostname`.zfs"
STATSD_ADDR="YOUR STATSD SERVER"
@johanneslamers
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 https://github.com/mattiasgeniar/varnish-4.0-configuration-templates/blob/master/default.vcl
#
# This is still work in progress, comments appreciated.
vcl 4.0;
import std;
import directors;
You can’t perform that action at this time.