Skip to content

Instantly share code, notes, and snippets.

View phumpal's full-sized avatar
🌮

Patrick Humpal phumpal

🌮
  • Northern California
View GitHub Profile
@phumpal
phumpal / azure.md
Created December 21, 2023 22:43
Azure Region Info
DisplayName               Name                 RegionalDisplayName
------------------------  -------------------  -------------------------------------
East US                   eastus               (US) East US
East US 2                 eastus2              (US) East US 2
South Central US          southcentralus       (US) South Central US
West US 2                 westus2              (US) West US 2
West US 3                 westus3              (US) West US 3
Australia East            australiaeast        (Asia Pacific) Australia East
Southeast Asia            southeastasia        (Asia Pacific) Southeast Asia
@phumpal
phumpal / sources.list
Created March 20, 2023 19:15
Precise 12.04 - /etc/apt/sources.list
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://old-releases.ubuntu.com/ubuntu/ precise main restricted
deb-src http://old-releases.ubuntu.com/ubuntu/ precise main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://old-releases.ubuntu.com/ubuntu/ precise-updates main restricted
deb-src http://old-releases.ubuntu.com/ubuntu/ precise-updates main restricted
@phumpal
phumpal / README.md
Created October 4, 2022 20:48
unable to initialize frontend: Readline during Docker image build

When attempting to install packages after an apt-get update on >= Ubuntu 20.04 the previous work around of DEBIAN_FRONTEND=noninteractive no longer seems to work (think building Docker images)

debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/aarch64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/aarch64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/aarch64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/aarch64-linux-gnu/perl-base) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
@phumpal
phumpal / redis.logstash.filter.rb
Created September 24, 2015 06:30
Redis Logstash Filter
input {
file {
path => "/var/log/redis/redis-server.log"
start_position => "beginning"
type => "redis"
add_field => { "role" => "redis" }
}
}
filter {
if [type] == "redis" {
@phumpal
phumpal / path_gitlab_upgrade.sh
Last active September 10, 2021 02:28
When gitlab apt repo seems borked. Then proceed on your way with upgrade shenanigans
#!/bin/sh
# https://docs.gitlab.com/ee/update/index.html#upgrade-paths
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
@phumpal
phumpal / glyphify.json
Created January 8, 2021 20:49
Humanized mutator output for not-so-boring sensu-core alerts
{
"mutators": {
"glyphify": {
"command": "/etc/sensu/mutators/glyphify.rb"
}
}
}
@phumpal
phumpal / Gemfile
Last active June 23, 2020 03:28
A simple Sinatara app to proxy Airbrake webhooks to Google Hangout Chats
source 'https://rubygems.org'
gem 'hangouts-chat'
gem 'sinatra'
@phumpal
phumpal / README.md
Last active February 21, 2020 20:05
A simple Sinatra app to proxy Airbrake webhooks to Cisco Spark Rooms

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
@phumpal
phumpal / README.md
Last active January 27, 2020 15:09
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.

Pre-requisites

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

Add a public key

@phumpal
phumpal / .htaccess
Created January 22, 2019 18:22
Heroku force ssl
##Force SSL
#Normal way (in case you need to deploy to NON-heroku)
RewriteCond %{HTTPS} !=on
#Heroku way
RewriteCond %{HTTP:X-Forwarded-Proto} !https
#If neither above conditions are met, redirect to https
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]