This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Usage: groovy hdfsDownloader.groovy [prod|qa|<dev username>] <file> (<output directory>) | |
// <file> can be an individual file or a directory of part files. | |
// If <output directory> is not specified, the current working directory is used | |
import groovy.json.JsonSlurper | |
import java.util.concurrent.Executors | |
import java.util.concurrent.ExecutorService | |
import java.util.concurrent.TimeUnit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Author: Keegan Witt | |
; Last Updated: 18 Jan 2011 | |
#NoEnv | |
#WinActivateForce | |
hours := 0 | |
minutes := 0 | |
seconds := 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name viewvc-link-log-view | |
// @version 0.1 | |
// @description Provides links to log view for directories in ViewVC until http://viewvc.tigris.org/issues/show_bug.cgi?id=470 is implemented | |
// @author Keegan Witt | |
// @include http://svn.*/viewvc/* | |
// ==/UserScript== | |
// a function that loads jQuery and calls a callback function when jQuery has finished loading | |
function addJQuery(callback) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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 ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==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) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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 |
OlderNewer