Skip to content

Instantly share code, notes, and snippets.

@sit
sit / test-archive-q.sh
Created November 29, 2011 21:55
Script to clean and run Hive's archive.q test
ant clean
ant package
(cd metastore && ant model-jar)
ant test -Dtestcase=TestCliDriver -Dqfile=archive.q
@sit
sit / propertyMissingPuzzle.groovy
Created September 23, 2011 16:08
A puzzle about why Groovy behaves a certain way with respect to propertyMissing
/*
* A minimal script to demonstrate the problem discussed at
* http://stackoverflow.com/questions/7524340/how-do-groovy-scripts-interact-with-propertymissing
*/
class Thing {
}
class FooSyntax {
def myKeyword(Thing t) { println "Hello Foo " + t.toString(); }
#!/bin/sh
#
# Convert from a MTS to a mp4 file using HandbrakeCLI
# Handbrake available from, for example, http://handbrake.fr/downloads2.php
#
# Renames files as prefixYYYYMMDD_basename.mp4 in the current directory.
# If you have an AVCHD directory, for example, you could run
# mts2mp4 /Volumes/SDCARD/PRIVATE/BDMV/STREAM/*.MTS
# to convert from your SDCARD into your current directory (on OS X).
#
@sit
sit / ctime
Created March 22, 2009 14:35
Simple Perl script to convert unix epoch times to text.
#!/usr/bin/perl -w
#
# Convert unix times (on command line or one-per-line via stdin)
# to human readable times in local timezone.
#
if (@ARGV) {
print join("\n", map { scalar localtime($_); } @ARGV), "\n";
} else {
while (<STDIN>) {
chomp;