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 / 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 / .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]
@phumpal
phumpal / README.md
Last active August 11, 2018 04:36
Devin's WormDeath processor

WormDeath Processor

WormDeath Processor is a simple and not so idiomatic Python script to process strain worm deaths over a given number of days.

The number of days and strains can be dynamic but the script ignores days where there were 0 worm deaths and outputs a two column CSV with the strains processed in series.

Usage

  • -i or --input input CSV
  • -o or --output output CSV
@phumpal
phumpal / Vagrantfile
Created March 17, 2018 07:14
jruby-1.7.4, toadhopper-2.1, openjdk-6-jdk, precise64, openSSL (1.0.1 14 Mar 2012)
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "precise64"
config.vm.network "public_network"
config.vm.provider "virtualbox" do |vb|
vb.memory = 2048
@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