Skip to content

Instantly share code, notes, and snippets.

sit /
Last active Apr 14, 2016

Keybase proof

I hereby claim:

  • I am sit on github.
  • I am emilsit ( on keybase.
  • I have a public key ASDX1Y165C9JTvdEJp0_CsOFCp1ZJde9srVIXqgGgjWBHQo

To claim this, I am signing this object:

sit /
Created Jan 2, 2014
Wrapper script to always use a secure user dir for Google Chrome. I find this useful for protecting private caches on a work computer.
# Mount a truecrypt volume on /media/truecrypt1
if [ ! -d $USER_DATA_DIR ]; then
echo No secure data directory $USER_DATA_DIR 1>&2
exit 1;
sit /
Created Dec 31, 2013
Import various text files into DayOne without using the DayOne CLI.
# Usage: mkdir /tmp/export; find path -name *.html | xargs python
# | tee /tmp/export.log
import datetime
import plistlib
import pytz
import uuid
import sys
sit /
Created Oct 29, 2013
A quick and dirty script to dump the cluster/service/role configuration via the Cloudera Manager API
#!/usr/bin/env python
from cm_api.api_client import ApiResource
def main(args):
cm_host = get(args, 1, "localhost")
cm_user = get(args, 2, "admin")
cm_pass = get(args, 3, "admin")
api = ApiResource(cm_host, username=cm_user, password=cm_pass)
View gist:6670869
# Ways of stringifying Hello World in Python
a = "hello"
b = "world"
"%s %s" % (a, b)
"%(a)s %(b)s" % locals()
"{a} {b}".format(**locals())
"{first} {second}".format(first=a, second=b)
sit / CentOS-6.3.json
Created Jul 16, 2013
Simple Veewee-inspired CentOS 6.3 box for packer
View CentOS-6.3.json
"provisioners": [
"type": "shell",
"scripts": [
"override": {
"virtualbox": {
sit / Berksfile
Created May 2, 2013
Vagrant and Berkshelf configuration for migrating a chef-repo into Berkshelf-managed cookbooks. (It appears berkshelf-vagrant does not do this automatically, despite what may suggest.)
View Berksfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
site :opscode
# Suck in all cookbooks in local chef-repo
Dir.entries("cookbooks").each do |cookbook_name|
next if cookbook_name.starts_with?('.')
cookbook_dir = "cookbooks/#{cookbook_name}"
next unless
sit / build.gradle
Last active Sep 28, 2021
A sample build.gradle for setting up a basic Gradle project for CDH application development
View build.gradle
apply plugin: "java"
apply plugin: "eclipse"
apply plugin: "idea"
group = "com.mycompany.hadoopproject"
version = "1.0"
repositories {
// Standard Maven
sit /
Created Nov 29, 2011
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 / propertyMissingPuzzle.groovy
Created Sep 23, 2011
A puzzle about why Groovy behaves a certain way with respect to propertyMissing
View propertyMissingPuzzle.groovy
* A minimal script to demonstrate the problem discussed at
class Thing {
class FooSyntax {
def myKeyword(Thing t) { println "Hello Foo " + t.toString(); }