Skip to content

Instantly share code, notes, and snippets.

View Karunamon's full-sized avatar

Mike Parks Karunamon

View GitHub Profile
@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
@Karunamon
Karunamon / syslog_generator.rb
Last active August 29, 2015 14:25
Syslog Generator
#!/usr/bin/env ruby
#Log message generation utility for testing syslog config
#Apache License - Michael Parks <mparks@tkware.info>
require 'random-word'
require 'trollop'
require 'syslog_protocol'
require 'socket'
$opts = Trollop::options do
banner <<-EOS
@Karunamon
Karunamon / terminal-control.sh
Last active August 29, 2015 14:26 — forked from bcap/terminal-control.sh
Useful terminal control characters
# Terminal output control (http://www.termsys.demon.co.uk/vtansi.htm)
TC='\e['
CLR_LINE_START="${TC}1K"
CLR_LINE_END="${TC}K"
CLR_LINE="${TC}2K"
# Hope no terminal is greater than 1k columns
RESET_LINE="${CLR_LINE}${TC}1000D"
@Karunamon
Karunamon / tsocks.formula
Last active December 20, 2015 04:29
Mac Homebrew formula for Tsocks. No idea why this is unavailable where it's supposed to be...
require 'formula'
class Tsocks < Formula
# The original is http://tsocks.sourceforge.net/
# This GitHub repo is a maintained fork with OSX support
homepage 'http://github.com/pc/tsocks'
head 'https://github.com/pc/tsocks.git'
depends_on 'autoconf' => :build if MacOS.xcode_version.to_f >= 4.3
@Karunamon
Karunamon / rpsafety.mrc
Last active December 26, 2015 14:29
RP Safety Script for mIRC
;INSTRUCTIONS - Save as a file in your mIRC directory, and run //load -rs (the filename)
;follow on screen instructions
on *:LOAD: {
echo -a 9,1RP Safety v0.01 by Necoco/TKWare Loaded.
echo -a 9,1Please make sure you specify the channel you wish to rp in with /rpset (channel).
/set %rpsafetyon 0
}
alias rpset {
@Karunamon
Karunamon / config.ini
Created December 26, 2015 17:24
irc3 python bot shenanigans
[bot]
nick = AsrielBot
realname = Dreemurr
host = irc.rizon.net
port = 6697
ssl = true
ssl_verify = CERT_NONE
includes =