Skip to content

Instantly share code, notes, and snippets.

View jkoelker's full-sized avatar

Jason Kölker jkoelker

View GitHub Profile
@jkoelker
jkoelker / aws-ec2-spot-fleet-role
Last active August 5, 2017 01:19
Convert Cattle to Pets
{
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Action": [
"ec2:DescribeImages",
"ec2:DescribeSubnets",
"ec2:RequestSpotInstances",
"ec2:TerminateInstances",
"ec2:DescribeInstanceStatus",
#!/usr/bin/env python3
import argparse
import itertools
import maya
import icalendar
SEQUENCE = ('Total Body Cardio Fix',
@jkoelker
jkoelker / gist:3a4c517c645b498343a3337326bfa66e
Created March 9, 2017 20:46
Windows 2016 Container AWS Credentials route
$r = (Get-NetRoute | Where {$_.DestinationPrefix -eq '0.0.0.0/0'})
New-NetRoute -DestinationPrefix 169.254.169.254/32 -InterfaceIndex $r.ifIndex -NextHop $r.NextHop
@jkoelker
jkoelker / gist:e9c7cf3bb4482dbb3d5791aacd7766f0
Created March 9, 2017 18:58
Windows 2016 Docker Jenkins Slave AWS user-data
<powershell> [87/513]
Set-ExecutionPolicy Unrestricted
net user Administrator '{{ win_admin_password }}'
iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex
choco install -y jre8 git
winrm quickconfig -q
winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="2048"}'
winrm set winrm/config '@{MaxTimeoutms="1800000"}'
winrm set winrm/config/service '@{AllowUnencrypted="true"}'
winrm set winrm/config/service/auth '@{Basic="true"}'
@jkoelker
jkoelker / gaming
Last active June 3, 2023 23:30
Enable or Disable the Touchpad while typing via libinput `xinput` (aka. libinput "gaming" mode)
#!/bin/sh
#
# libinput by default will disable the touchpad while a key is pressed.
# to disable this, run `xinput` to list the inputs. find the name of your
# touchpad (mine is 'Microsoft Surface Keyboard Touchpad').
#
# Disable the setting 'Disable While Typing Enabled'
# `xinput --set-prop 'Microsoft Surface Keyboard Touchpad' \
# 'libinput Disable While Typing Enabled' 0`
#
@jkoelker
jkoelker / gist:1d7fa2d85ca342998ff7948268379102
Last active December 12, 2019 17:32
Gmail Message Dark
/*Message Background*/ .Bk, .Bu {
background: #111 !important;
}
/*Message Background*/ .Bk {
background: #111 !important;
}
.kQ .Bk .G2 {
background: #111 !important;
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import netaddr
import socket
import subprocess
import tempfile
ASN_QUERY = '-i origin -T route %s\r\n'

Keybase proof

I hereby claim:

  • I am jkoelker on github.
  • I am jkoelker (https://keybase.io/jkoelker) on keybase.
  • I have a public key whose fingerprint is 1511 6539 988B DF4A 67E5 BF93 D474 80BB 0C9D BDA6

To claim this, I am signing this object:

@jkoelker
jkoelker / xbmc.py
Last active December 30, 2015 10:09 — forked from kjmancuso/xbmc.py
# -*- coding: utf-8 -*-
import MySQLdb as mdb
import MySQLdb.cursors
import datetime
from flask import Flask, render_template
from flask.ext.sqlalchemy import SQLAlchemy
import sqlalchemy as sa
@jkoelker
jkoelker / gist:5474392
Created April 27, 2013 19:37
created by github.com/tr3buchet/gister
#!/usr/bin/env python
import re
import sys
# NOTE(jkoelker) Yea its regex, I hate it too
pattern = re.compile(r' '.join([r'(?P<host>.*?)',
r'-(?P<unknown>.*?)-',
r'(?P<date>.*?)',
r'"(?P<method>.*?)',