Skip to content

Instantly share code, notes, and snippets.

View zxjinn's full-sized avatar

Kelvin Jasperson zxjinn

View GitHub Profile
@zxjinn
zxjinn / server-name-wordlist-mnemonic.txt
Last active January 28, 2017 19:51 — forked from bwbaugh/server-name-wordlist-mnemonic.txt
Server name wordlist (mnemonic)
# Original blog post: <https://mnx.io/blog/a-proper-server-naming-scheme/>
# Original word list: <http://web.archive.org/web/20091003023412/http://tothink.com/mnemonic/wordlist.txt>
# Sample usage: `curl -s https://gist.githubusercontent.com/zxjinn/4da47f07408ea420803c1886d0a11828/raw | sort -R | head --lines 1`
abraham
absent
absorb
absurd
academy
accent
acid
@zxjinn
zxjinn / keybase.md
Created February 8, 2016 23:11
keybase.md

Keybase proof

I hereby claim:

  • I am zxjinn on github.
  • I am zxjinn (https://keybase.io/zxjinn) on keybase.
  • I have a public key ASAnw-qN-Rfum_40Q2jPpbCSKd1TW_SUpgcDbdbsAsxVhwo

To claim this, I am signing this object:

#!/usr/bin/env python
# Find the IAM username belonging to the TARGET_ACCESS_KEY
# Useful for finding IAM user corresponding to a compromised AWS credential
# Usage:
# find_iam_user AWS_ACCESS_KEY_ID
# Requirements:
#
# Environmental variables:
# AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY
# or
@zxjinn
zxjinn / autostart
Created March 11, 2015 04:10
XenServer manual administration scripts
#!/bin/bash
if [ -z $1 ]; then
echo "pass VM name as param"
exit 1
fi
xe vm-param-set uuid=$(xe vm-list name-label=$1 | head -n1 | awk {'print $NF'}) other-config:auto_poweron=true
@zxjinn
zxjinn / vip
Created February 20, 2015 16:30
AppleScript that pastes Symantec VIP code (used in Alfred Workflow)
to getCurrentApp()
return (path to frontmost application as text)
end getCurrentApp
on processCheck()
tell application "System Events" to get name of every process
if the result contains "VIP Access" then
activate application "VIP Access"
else
processCheck()
@zxjinn
zxjinn / listen.sh
Last active August 29, 2015 14:09
Line speed test
#!/bin/bash
# This is the case on Ubuntu
# TODO: Write checks for other OSes
which nc.traditional 1>&2> /dev/null
return_value=$?
if [ ${return_value} -ne 0 ]; then
echo "Traditional NC doesn't appear to be installed, please install 'netcat-traditional'"
exit 1
fi
@zxjinn
zxjinn / Gemfile
Last active September 16, 2023 19:41
Ruby sunrise daemon
source 'https://rubygems.org'
gem 'daemons'
gem 'RubySunrise'
gem 'rufus-scheduler'
@zxjinn
zxjinn / RaspberryPiShairport.sh
Created March 20, 2013 03:40
From a new Raspian install to a working Shairport
# all as root
apt-get update
apt-get -y upgrade
apt-get -y install git libao-dev libssl-dev libcrypt-openssl-rsa-perl libio-socket-inet6-perl libwww-perl avahi-utils libmodule-build-perl
# Shairport pre-req
git clone https://github.com/njh/perl-net-sdp.git
cd perl-net-sdp
perl Build.PL
./Build
OPTIONS * RTSP/1.0
CSeq: 1
User-Agent: AudioStation/3.1 (Synology)
================================
RTSP/1.0 200 OK
Audio-Jack-Status: connected; type=analog
CSeq: 1
Public: ANNOUNCE, SETUP, RECORD, PAUSE, FLUSH, TEARDOWN, OPTIONS, GET_PARAMETER, SET_PARAMETER
================================
ANNOUNCE rtsp://192.168.0.4/4166333301 RTSP/1.0
# ubuntu 12.04, assuming fresh install, still a work in progress
24 Feb 2013
###### as root user
# install pre-reqs
apt-get update
apt-get -y upgrade
apt-get -y dist-upgrade
apt-get -y install gcc g++ make cmake unzip subversion git-core gzip