Skip to content

Instantly share code, notes, and snippets.

💭
Delivering Giblets

Andrew Howden andrewhowdencom

💭
Delivering Giblets
Block or report user

Report or block andrewhowdencom

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
View foo.gpg
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFyjIfEBEADryFqbJGSjmPGLa6NRtcmLIYVdeFk9U2tJOV0Wq+cMLa7By64F
BFP0eEumynY7kdOc8gk/8osbC+owpz83hoyZI1zpUrjLQ8MzMoWJdL8lGVR+FyyV
iR4oY+HCES/VqjbGgZe2uHr1suysn2+IQjb20x3ukVQxmJtVtrmWy4fAxQ9EKDgI
mTRvfhvPKkH2jt3iudm8YMEk9foPsL53/H811mZccpd1/48gGX+DY7D+ePXJqmAB
mCVGhRqGKrOoSaTLHd9sAWYvI1QMs2Emt5BkUwgrfWS1np+xlmmrVYf476QF21rL
ypcynYNY0vKDDPFyp4XdOcmCDyPqlNCPUMAC/jr9bcZaqx8OmFHDfBFugj3CGUEq
IN9E6JofZbOc2tKdFh4j6laoA09f/4elDOyHHOoDhtxraxfqKOu8ZTfk6Yl8oZ/+
nweLJCJI0zSXUXA9218cq/MgVePrE0Z2lu4PUXagu6zfX6jQAcTALtD8/k0I8Eu6
@andrewhowdencom
andrewhowdencom / route.py
Created Jun 17, 2018
A tool to add routes for domains as the work VPN is slow and crap. Also, me learning python.
View route.py
#!/usr/bin/env python3
import argparse
import dns.resolver
import netifaces
from subprocess import call
def get_interface_by_ip(ip):
"""Given an IP will return the interface associated. Doesn't support the same IP bound to multiple interfaces.
View kubernetes.py
from kubernetes import client, config
import sched
import time
import logging
import threading
# Debugging
from pprint import pprint
View strace-many.sh
#!/bin/bash
SCRIPT_PATH="$0"
SCRIPT_NAME="$(basename $0)"
function __get_list() {
SEARCH_TERM="$1"
LIST=$(ps -ef | grep "${SEARCH_TERM}" | awk '{print $2}')
View prometheus alerts dashboard
{
"id": 1,
"title": "Alerts",
"tags": [],
"style": "dark",
"timezone": "browser",
"editable": true,
"sharedCrosshair": false,
"hideControls": false,
"time": {
View gist:49e17febad8afa418fe96cc30416bc17
apiVersion: v1
data:
all-nodes-dashboard.json: |-
{
"dashboard": {
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "prometheus",
"description": "",
@andrewhowdencom
andrewhowdencom / safety.yaml
Created Oct 20, 2016
Today I did something stupid and rm -rf'd root. Never again.
View safety.yaml
---
- name: "Install tools to prevent the developer hurting themselves"
package:
name: "{{ item }}"
state: "latest"
with_items:
- "safe-rm"
- name: "Replace the normal rm command with safe-rm"
alternatives:
@andrewhowdencom
andrewhowdencom / template-string.js
Last active Aug 24, 2016
Playing with template strings
View template-string.js
var template = `This is a lovely notion, but I\'m not sure if ${whoever} will go for it`;
var whoever = 'you';
console.log(template);
View keybase.md

Keybase proof

I hereby claim:

  • I am andrewhowdencom on github.
  • I am andrewhowdencom (https://keybase.io/andrewhowdencom) on keybase.
  • I have a public key whose fingerprint is 79BA C08A 6ED1 FF1E ABE3 50A7 587D 3B3A 961D 2D2D

To claim this, I am signing this object:

@andrewhowdencom
andrewhowdencom / gist:7ce842855c2a34a90685342a1f17664b
Created Jun 23, 2016
(If my smoke screens are any good) I couldn't even break prod if I tried.
View gist:7ce842855c2a34a90685342a1f17664b
● 22:01 ~/Development/web/m2pwa.littleman.co $ kubectl get pods
NAME READY STATUS RESTARTS AGE
letsencrypt-deployment-1892913836-pd0q7 1/1 Running 0 12m
nginx-deployment-2849758121-yvsfo 1/1 Running 0 12m
nginx-deployment-2987973546-fw8ac 0/1 CrashLoopBackOff 1 8s
nginx-deployment-2987973546-tkcy5 0/1 CrashLoopBackOff 1 8s
You can’t perform that action at this time.