Skip to content

Instantly share code, notes, and snippets.

Patrick Humpal phumpal

View GitHub Profile
@phumpal
phumpal / Gemfile
Last active Jun 23, 2020
A simple Sinatara app to proxy Airbrake webhooks to Google Hangout Chats
View Gemfile
source 'https://rubygems.org'
gem 'hangouts-chat'
gem 'sinatra'
@IanColdwater
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: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@neomantra
neomantra / High_Performance_Redis.md
Last active Jun 5, 2020
Notes on running Redis with HPC techniques
View High_Performance_Redis.md

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 [redis.io documentation](https://redis.io/do

@geerlingguy
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
phumpal / README.md
Last active Feb 21, 2020
A simple Sinatra app to proxy Airbrake webhooks to Cisco Spark Rooms
View README.md

Setup

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
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

@lesovsky
lesovsky / postrgesql-autovacuum-queue-detailed.sql
Created Apr 10, 2017
postrgesql-autovacuum-queue-detailed
View postrgesql-autovacuum-queue-detailed.sql
WITH table_opts AS (
SELECT
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 (
SELECT
oid, relname, nspname, relfrozenxid, relminmxid,
View Effective_Engineer.md

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
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
You can’t perform that action at this time.