Skip to content

Instantly share code, notes, and snippets.

View wallentx's full-sized avatar
:shipit:
ȋ̴͎ ̶̘͝u̷̥͆s̴͖̾ē̷̠ ̶̟̉a̴͙̕ŗ̸͆č̶̬ḣ̷̭ ̴̡̄b̷̳̒ẗ̷͍ẘ̴̡

William Allen wallentx

:shipit:
ȋ̴͎ ̶̘͝u̷̥͆s̴͖̾ē̷̠ ̶̟̉a̴͙̕ŗ̸͆č̶̬ḣ̷̭ ̴̡̄b̷̳̒ẗ̷͍ẘ̴̡
View GitHub Profile
@wallentx
wallentx / lang.map.diff
Created January 10, 2018 01:46 — forked from tkfm-yamaguchi/lang.map.diff
source-highlight's language definition file for YAML
---/usr/share/source-highlight/lang.map.old
+++/usr/share/source-highlight/lang.map
@@ -169,3 +169,5 @@
groovy = groovy.lang
json = json.lang
feature = feature.lang
+yaml = yaml.lang
+yml = yaml.lang
# INCIDENT DATE - INCIDENT TYPE
## Meeting
#### Waiving meetings
In some cases the IC might determine that a PM meeting for the incident isn't needed.
If the IC decides to waive the meeting please replace the `Meeting` section with a
note indicating the meeting has been waived (example: `Meeting waived: Paul Mooring`)
@wallentx
wallentx / porstmortem-template
Created June 13, 2018 23:29
postmortem-template-confluence
Incident <#> - <Post Mortem Title>
Date:
This is a blameless Post Mortem.
We will not focus on the past events as they pertain to "could've", "should've", etc.
All follow up action items will be assigned to a team/individual before the end of the meeting. If the item is not going to be top priority leaving the meeting, don't make it a follow up item.
Incident Leader:
Name Title Team/Department
@wallentx
wallentx / sysv.init.script.to.systemd.unit.file.md
Created June 19, 2018 19:31 — forked from frostytear/sysv.init.script.to.systemd.unit.file.md
Convert SysV Init scripts to Systemd Unit File

Let's say you have a SysV Init Script named foo

  1. Copy the file to /etc/init.d/foo

  2. Enable the SysV service: chkconfig --add foo

  3. Enable the SysV service: chkconfig foo on

  4. Start the service: service foo start. After this, systemd-sysv-generator will generate this file /run/systemd/generator.late/foo.service, copy this file to /etc/systemd/system by running: cp /run/systemd/generator.late/foo.service /etc/systemd/system/foo.service

  5. Edit /etc/systemd/system/foo.service by running systemctl edit foo.service, add in the following line to foo.servie (this makes the service installable)

[Install]

@wallentx
wallentx / slack.sh
Created October 5, 2018 16:43 — forked from andkirby/slack.sh
Shell/Bash script for sending slack messages.
#!/usr/bin/env bash
####################################################################################
# Slack Bash console script for sending messages.
####################################################################################
# Installation
# $ curl -s https://gist.githubusercontent.com/andkirby/67a774513215d7ba06384186dd441d9e/raw --output /usr/bin/slack
# $ chmod +x /usr/bin/slack
####################################################################################
# USAGE
# Send message to slack channel/user

Keybase proof

I hereby claim:

  • I am wallentx on github.
  • I am wallentx (https://keybase.io/wallentx) on keybase.
  • I have a public key ASDAFn9TCa2PleaQERKCVNHFCa9WswEHQbyWsKAM8SyADAo

To claim this, I am signing this object:

@wallentx
wallentx / awsauth
Last active March 26, 2020 18:13
MFA helper for AWS CLI
#!/bin/bash
set -e
AWS_ENV=$1
TMPAUTH=$(mktemp /tmp/authXXXXXXXX)
if [[ -z $AWS_ENV ]]; then
echo "No profile specified"
echo "Usage: aws-profile <profile>"
@wallentx
wallentx / scrape-token.js
Created April 6, 2020 16:58
I created this before github had an API to get self-hosted runner token - https://developer.github.com/v3/actions/self_hosted_runners/#create-a-registration-token
const puppeteer = require('puppeteer');
async function run() {
const browser = await puppeteer.launch({
headless: true
});
const repo = process.argv[2]
const page = await browser.newPage();
await page.goto('https://github.com/login');
@wallentx
wallentx / inkyImpression-watchButton
Last active May 23, 2024 16:11
Change image on button press - for the Inky Impression - 5.7", 7-color eInk display for the RPi
#!/usr/bin/env python3
import signal
import RPi.GPIO as GPIO
import subprocess
# Gpio pins for each button (from top to bottom)
BUTTONS = [5, 6, 16, 24]
# These correspond to buttons A, B, C and D respectively
@wallentx
wallentx / inkywrite
Created November 24, 2020 18:52
Write image to Inky Impression - 5.7", 7-color eInk display for the RPi
#!/usr/bin/env python3
import sys
from PIL import Image
from inky.inky_uc8159 import Inky
inky = Inky()
saturation = 0.5