Skip to content

Instantly share code, notes, and snippets.

View jk0's full-sized avatar

Josh Kearney jk0

  • GitHub Staff
  • Wisconsin
View GitHub Profile
@jk0
jk0 / plex.txt
Created December 15, 2020 14:05
MusicBrainz Picard / Plex
%albumartist%/$if($ne(%albumartist%,),%album% $if(%originaldate%,\($left(%originaldate%,4)\),%originaldate%)/)$if($gt(%totaldiscs%,1),%discnumber%)$num(%tracknumber%,2) - %title%
@jk0
jk0 / rpi.txt
Last active April 29, 2020 14:43
RPI Tweaks
# Enable SSH, disable GUIs, set Memory Split to 16
sudo raspi-config
sudo apt install vim
sudo apt purge libreoffice* wolfram-engine minecraft-pi sonic-pi
sudo apt clean
sudo apt autoremove
# Improve SD card performance
sudo vim /etc/fstab
@jk0
jk0 / plex.py
Last active April 28, 2017 13:46
Get notified when someone watches something on Plex.
import flask
import json
import requests
APP = flask.Flask(__name__)
def send_notification(description):
# endpoint = "https://www.notifymyandroid.com/publicapi/notify?"
@jk0
jk0 / process.sh
Last active September 12, 2017 14:31
#!/bin/bash
CWD="/home/<USER>/Incoming/$2"
echo "Start post processing for: $CWD" >> /tmp/deluge.log
cd "$CWD"
/home/<USER>/src/unrarall/unrarall -s --clean=all "$CWD" 2>> /tmp/deluge.log
exiftool -all= -ext mp4 -ext m4v -ext avi -R "$CWD"
@jk0
jk0 / gist:dd5343ac044fed484596ce98d08542bc
Last active November 29, 2016 23:16
gcloud Dockerfile
FROM ubuntu:xenial
RUN apt-get update && apt-get install -y apt-transport-https ca-certificates curl docker.io vim
RUN echo "deb https://packages.cloud.google.com/apt cloud-sdk-xenial main" > /etc/apt/sources.list.d/google-cloud-sdk.list
RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
RUN apt-get update && apt-get install -y google-cloud-sdk
diff --git a/roles/configure/templates/bastion-cloud-config.yml.j2 b/roles/configure/templates/bastion-cloud-config.yml.j2
index 28743fd..c227484 100644
--- a/roles/configure/templates/bastion-cloud-config.yml.j2
+++ b/roles/configure/templates/bastion-cloud-config.yml.j2
@@ -49,7 +49,7 @@ write_files:
go get github.com/cloudflare/cfssl/cmd/cfssljson
sudo mv $GOPATH/bin/cfssljson /usr/local/bin
- wget https://storage.googleapis.com/kubernetes-release/release/v1.2.2/bin/linux/amd64/kubectl -O /tmp/kubectl
+ wget https://storage.googleapis.com/kubernetes-release/release/v1.4.0/bin/linux/amd64/kubectl -O /tmp/kubectl
@jk0
jk0 / gist:cf81767533aa6a096dc5
Created March 15, 2016 17:56
Beanstalk Docker
sudo gpasswd -a ec2-user docker
@jk0
jk0 / setup.py
Last active February 9, 2016 19:45
import setuptools
setuptools.setup(
name="setuppy-github-test",
version="0.0.1",
author="Josh Kearney",
author_email="[email protected]",
install_requires=[
"python_planet_pda_common"
@jk0
jk0 / gist:c36c96b6ad69eed408e4
Last active December 15, 2015 02:42
Enable ChromeCast in UAP Guest Mode
1) SSH to access points
2) vi/tmp/system.cfg
3) change l2_isolation=enabled to disabled
4) syswrapper.sh apply-config
# https://community.ubnt.com/t5/UniFi-Wireless/Chromecast-on-guest-network/td-p/1229669
6) add 192.168.144.13/32 and 239.255.255.250/32 to Allowed Subnets
@jk0
jk0 / password.sh
Created August 20, 2015 18:17
Copy password from keychain to clipboard
#!/bin/bash
PASSWORD=$(security 2>&1 >/dev/null find-generic-password -ga global:<name> | cut -c12-)
export PASSWORD=${PASSWORD%?}
echo $PASSWORD | tr -d "\n"| pbcopy && pbpaste