Skip to content

Instantly share code, notes, and snippets.

Avatar

Keegan Witt keeganwitt

View GitHub Profile
@keeganwitt
keeganwitt / AutoClicker.ahk
Created Aug 29, 2011
A generic autoclicker AutoHotkey program
View AutoClicker.ahk
; Author: Keegan Witt
; Last Updated: 18 Jan 2011
#NoEnv
#WinActivateForce
hours := 0
minutes := 0
seconds := 0
@keeganwitt
keeganwitt / Guild_Wars_Tonic_Bot.ahk
Created Aug 29, 2011
An AutoHotkey tonic bot for Guild Wars
View Guild_Wars_Tonic_Bot.ahk
; Author: Keegan Witt
; Last Updated: 18 Jan 2011
; Adapted from http://www.autohotkey.com/forum/topic55918.html
#NoEnv
#WinActivateForce
SendMode Input
MsgBox, 0, GW Tonic Bot, You can press Ctrl-Q anytime to quit
@keeganwitt
keeganwitt / Guild_Wars_Drunkard_Bot.ahk
Last active Sep 27, 2015
An AutoHotkey bot to maintain the optimum level of drunkenness for the drunkard title in Guild Wars.
View Guild_Wars_Drunkard_Bot.ahk
; Author: Keegan Witt
; Last Updated: 18 Jan 2011
; Adapted from http://www.autohotkey.com/forum/topic22611-30.html
#NoEnv
#WinActivateForce
SendMode Input
MsgBox, 0, GW Drunkard Bot, You can press Ctrl-Q anytime to quit
@keeganwitt
keeganwitt / viewvc-link-log-view.user.js
Created Sep 1, 2011
A userscript to add links to log view for directories in ViewVC.
View viewvc-link-log-view.user.js
@keeganwitt
keeganwitt / launchRis.bat
Last active Sep 29, 2015
Deletes temp file that prevents RIS 2.0 from launching correctly on newer versions of Windows then launches RIS 2.0
View launchRis.bat
@echo off
rem Author: Keegan Witt
rem Description: Deletes temp file that prevents RIS 2.0 from launching correctly on newer versions of Windows then launches RIS 2.0
del "%TEMP%\Ris 2.0.mov.#res"
if %PROCESSOR_ARCHITECTURE% == x86 (
"%PROGRAMFILES%\LEGO MINDSTORMS\RIS 2.0\LaunchRis2.exe"
) else (
"%PROGRAMFILES(X86)%\LEGO MINDSTORMS\RIS 2.0\LaunchRis2.exe"
@keeganwitt
keeganwitt / GuildWarsImage.bat
Last active Sep 29, 2015
Launches Guild Wars with the -image option
View GuildWarsImage.bat
@echo off
rem Author: Keegan Witt
rem Version 1.0
rem This runs Guild Wars with the -image argument, which downloads all the updated files.
rem if Guild Wars is running, kill it
TASKKILL /F /IM "gw.exe" 2> NUL
rem launch Guild Wars with the -image option
if %PROCESSOR_ARCHITECTURE% == x86 (
@keeganwitt
keeganwitt / mercurial-stay-on-tip.user.js
Created May 15, 2012
A userscript to change links to tip version in Mercurial web interface if you are navigating from the tip version.
View mercurial-stay-on-tip.user.js
// ==UserScript==
// @name mercurial-stay-on-tip
// @version 0.1
// @description Provide changes links to tip version in Mercurial web interface if you are navigating from the tip version.
// @author Keegan Witt
// @include http://hg.openjdk.java.net/*
// ==/UserScript==
// a function that loads jQuery and calls a callback function when jQuery has finished loading
function addJQuery(callback) {
@keeganwitt
keeganwitt / GenerateJavaOnixTagConverter.groovy
Created May 29, 2012
A Groovy script to generate Java source files to convert between ONIX short and reference tags
View GenerateJavaOnixTagConverter.groovy
/**
* @author Keegan Witt
* @version 1.0
*/
class GenerateJavaOnixTagConverter {
private static final String SCHEMA_2_FILENAME = "ONIX_BookProduct_Release2.1_reference.xsd"
private static final String SCHEMA_3_FILENAME = "ONIX_BookProduct_3.0_reference.xsd"
private static final String ONIX_2_CLASS = "Onix2TagConverter"
private static final String ONIX_3_CLASS = "Onix3TagConverter"
@keeganwitt
keeganwitt / SleepInputFormat.java
Last active Dec 20, 2015
SleepInputFormat to trick Hadoop into thinking there's input to process, when really there's not (useful in little test jobs)
View SleepInputFormat.java
/**
* This is a lot like the InputFormat defined in Hadoop's
* <a href="https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.22/mapreduce/src/test/mapred/org/apache/hadoop/mapreduce/SleepJob.java">SleepJob</a>
* except that it uses the Hadoop 2 API.
*/
public static class SleepInputFormat extends InputFormat<IntWritable, IntWritable> {
public static final String MAP_SLEEP_COUNT = "mapreduce.sleepjob.map.sleep.count";
public static final String REDUCE_SLEEP_COUNT = "mapreduce.sleepjob.reduce.sleep.count";
@Override
@keeganwitt
keeganwitt / hdfs-username-hack.user.js
Created Oct 3, 2013
A userscript to override the username to allow you to view HDFS files and directories from the NameNode web interface that aren't world readable
View hdfs-username-hack.user.js
// ==UserScript==
// @name hdfs-username-hack
// @version 0.1
// @description Overrides the username to allow you to view HDFS files and directories from the NameNode web interface that aren't world readable
// @author Keegan Witt
// @include */browseDirectory.jsp*
// @include */browseBlock.jsp*
// ==/UserScript==
// a function that loads jQuery and calls a callback function when jQuery has finished loading