Skip to content

Instantly share code, notes, and snippets.

View Karunamon's full-sized avatar

Mike Parks Karunamon

View GitHub Profile
Karunamon / gist:9218604
Last active August 29, 2015 13:56
Keybase proof
### Keybase proof
I hereby claim:
* I am karunamon on github.
* I am mparks ( on keybase.
* I have a public key whose fingerprint is 941B F3C3 0864 E10C F14C 6BBF B553 9BD4 1632 3550
To claim this, I am signing this object:
Karunamon / conf_cli_add_datefields.rb
Created March 3, 2014 18:08
Appends month/day/year fields to CSV files - useful because you apparently can't target blog entries by title in Confluence CLI without specifying their date separately.
#!/usr/bin/env ruby
#Add date fields for mass operations on blogs with Atlassian CLI.
require "csv"
fail "Specify path to input file" unless ARGV[0]
fail "Specify path to output file" unless ARGV[1]
hdr=true[1], 'w') do |csv|
CSV.foreach(ARGV[0], :headers => true, :skip_blanks => true) do |row|
date = row["Created"].match(/(?<month>\d+)\/(?<day>\d+)\/(?<year>\d+)/)
Karunamon / distribute_ssh_keys.rb
Created April 14, 2014 15:09
SSH Key Distribution
#!/usr/bin/env ruby
# distribute_ssh_keys.rb
# Jason Boxman <>
# 20110624
# From
# Unsure of the license on this. Tread carefully.
# Sanely deploy ssh public key to multiple hosts.
Karunamon /
Last active August 29, 2015 14:01 — forked from miglen/Apache Tomcat 8 Start stop script init.d script
Tomcat 7 init.d script
# Tomcat 7 start/stop/status script
# Forked from:
# @author: Miglen Evlogiev <>
# Release updates:
# Updated method for gathering pid of the current proccess
# Added usage of CATALINA_BASE
# Added coloring and additional status
Karunamon /
Last active August 29, 2015 14:04
Shell script integrity verification
#!/usr/bin/env bash
#Add this function to any shell script. You require a HTTP(preferrably HTTPS)
#server to serve up a .asc file named identically to your script. Your public key
#must also be installed on the server. Requires curl and gpg.
#To generate the signature file: gpg -a --detach-sig <script filename>
base=$(basename $0)
temp=`mktemp /tmp/$(basename $0).XXXXX`
curl -sS http://someserver/$base.asc -o $temp >/dev/null 2>&1
#System language
lang en_AU
#Language modules to install
langsupport en_AU
#System keyboard
keyboard us
#System mouse
Karunamon / nowplaying.rb
Last active August 29, 2015 14:07
Lame Icecast now playing badge creator
require 'xmlsimple'
require 'net/http'
require 'erb'
#Stream mount point on the server
$mountpoint = 'live.ogg'
#URL to the icecast server root on the web, including trailing slash
$server = ""
Karunamon / programming.go
Created December 1, 2014 20:30
Hello World - In go - but not the way you're used to
//programming.go - Hello world, with an acerbic twist
//Michael Parks, 2014, WTFPL
package main //Every standalone program begins with this package
import "fmt" //We need this to output to the screen
//All languages suck, usually at the same things, so let's just declare our insults head of time to save space.
//All string constants, note the reverse declaration order (name) (type)
const InsultVerbosity string = "Why not just write in COBOL instead? Why is this crap so verbose?"
Karunamon / AnyConnectLocalPolicy.xml
Created December 30, 2014 17:30
Anyconnect Policy XML
<?xml version="1.0" encoding="utf-8"?>
<AnyConnectLocalPolicy acversion="str1234">
"Thy Dungeonman - Part Deux" by TK
Book 1 - Items, definitions, and other folderol
Part 1 - Meta stuff
Rule for printing a parser error:
say "wat?" instead.
A thing can be ungettable. Instead of taking an ungettable thing: say "You can't get [noun]."; rule fails.