Skip to content

Instantly share code, notes, and snippets.

View Karunamon's full-sized avatar

Mike Parks Karunamon

View GitHub Profile
#System language
lang en_AU
#Language modules to install
langsupport en_AU
#System keyboard
keyboard us
#System mouse
@Karunamon
Karunamon / nowplaying.rb
Last active August 29, 2015 14:07
Lame Icecast now playing badge creator
#!/usr/bin/ruby
require 'xmlsimple'
require 'net/http'
require 'erb'
###CONFIG
#Stream mount point on the server
$mountpoint = 'live.ogg'
#URL to the icecast server root on the web, including trailing slash
$server = "http://isengard.tkware.us:8000/"
@Karunamon
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
Karunamon / AnyConnectLocalPolicy.xml
Created December 30, 2014 17:30
Anyconnect Policy XML
<?xml version="1.0" encoding="utf-8"?>
<AnyConnectLocalPolicy acversion="str1234">
<FipsMode>false</FipsMode>
<BypassDownloader>true</BypassDownloader>
<RestrictWebLaunch>false</RestrictWebLaunch>
<StrictCertificateTrust>false</StrictCertificateTrust>
<RestrictTunnelProtocols>false</RestrictTunnelProtocols>
<RestrictPreferenceCaching>false</RestrictPreferenceCaching>
<ExcludePemFileCertStore>false</ExcludePemFileCertStore>
<ExcludeWinNativeCertStore>false</ExcludeWinNativeCertStore>
"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.
@Karunamon
Karunamon / AnyConnectLocalPolicy.xml
Last active August 29, 2015 14:12
AnyConnect VPN Quick Connector Applescript
<?xml version="1.0" encoding="utf-8"?>
<AnyConnectLocalPolicy acversion="str1234">
<!--WARNING: If your network administrators have defined this file already, then replacing the existing version with this will
almost certainly break things. In this case, try just changing the 'BypassDownloader' option to true, rather than
replacing this file outright.-->
<FipsMode>false</FipsMode>
<BypassDownloader>true</BypassDownloader>
<RestrictWebLaunch>false</RestrictWebLaunch>
<StrictCertificateTrust>false</StrictCertificateTrust>
<RestrictTunnelProtocols>false</RestrictTunnelProtocols>
@Karunamon
Karunamon / stream.java
Created January 13, 2015 00:46
Stream vs for loop processing
import java.util.ArrayList;
class main {
public static void print(String arg) {
System.out.println(arg);
}
public static ArrayList<Boolean> worklist = new ArrayList<Boolean>();
public static void main(String[] args) {
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb ftp://ftp.ussg.iu.edu/linux/ubuntu/ utopic main restricted
deb-src ftp://ftp.ussg.iu.edu/linux/ubuntu/ utopic main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb ftp://ftp.ussg.iu.edu/linux/ubuntu/ utopic-updates main restricted
deb-src ftp://ftp.ussg.iu.edu/linux/ubuntu/ utopic-updates main restricted
@Karunamon
Karunamon / encvol.sh
Created March 23, 2015 19:26
Simple encrypted volume mounter
#!/bin/bash
volumeName='encrypted-volume'
volumePath="/var/Private/$volumeName"
mountPath='/mmt/private/'
#Default ext* file system stuff makes for good test fodder
stat $mountPath/lost+found >> /dev/null 2>&1
if [ $? == 0 ]; then
#It's mounted, unmount it
@Karunamon
Karunamon / tomcat.conf
Last active August 29, 2015 14:19 — forked from witscher/tomcat.conf
Tomcat upstart script
description "Tomcat Server"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 10 5
# run as non privileged user
# add user with this command:
## adduser --system --ingroup www-data --home /opt/tomcat tomcat