Skip to content

Instantly share code, notes, and snippets.

cramja /
Created Jun 2, 2018
Understand the performance impact of reflection
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class ReflectionTest {
public interface FooGetter {
-------------------------- AUTONOMIC PROPRIETARY 1.0 --------------------------
Copyright (c) 2016, Autonomic Incorporated - All rights reserved
Proprietary and confidential.
NOTICE: All information contained herein is, and remains the property of
Autonomic Incorporated and its suppliers, if any. The intellectual and
technical concepts contained herein are proprietary to Autonomic Incorporated
and its suppliers and may be covered by U.S. and Foreign Patents, patents in
cramja / d3_example_1.html
Last active Apr 6, 2017
Example of updates with merging in d3
View d3_example_1.html
<!DOCTYPE html>
<meta charset="utf-8">
text {
font: bold 48px monospace;
.enter {
fill: green;
cramja / d3_example_0.html
Created Apr 6, 2017
making some circles and lines in d3
View d3_example_0.html
<!DOCTYPE html>
button {
position: absolute;
top: 10px;
left: 10px;
circle {
cramja / example.cpp
Last active Apr 6, 2017
clang++ -std=c++14 example.cpp -o ex.out -lpthread
View example.cpp
// A simple mutex-sharing scheme.
#include <assert.h>
#include <cstdlib>
#include <iostream>
#include <mutex>
#include <thread>
using namespace std;
cramja /
Last active Apr 6, 2017
For manipulating GPDB/ORCA optimization flags
#! /usr/#!/usr/bin/env python
import subprocess
xforms = \
cramja / qs-apache-rc-email-template.txt
Created Mar 4, 2017
Simple Apache Quickstep RC email template
View qs-apache-rc-email-template.txt
Subject: [VOTE] Apache Incubating Quickstep {VERSION} RC{CANDIDATE}
This vote is for approval of the Quickstep-{VERSION} RC{CANDIDATE}.
Voters should download, unpack, build, and test the package before voting.
A +1 vote means that the package passes all tests and meets Apache guidelines.
A -1 vote should be accompanied with a short reason.
Votes will remain open for 3 days.
cramja /
Created Feb 20, 2017
Quickstep release alpha script
# Scripts for Releasing Quickstep
# Note: This script is a scratch pad with most of the relevent commands.
# Modify it to see fit. We'll finalize it when we understand the
# process better.
# - you must have previously created a gpg key using your apache username
# and uploaded it to a keyserver []
# - make sure someone in the group has validated your key
cramja /
Last active Aug 12, 2016
usage: ctest -R your_test > test.out && python test.out
#!/usr/bin/env python
import sys
import re
import os
# regex for useful parts of the diff file
re_start_digits = re.compile(ur'^\d+: ', re.MULTILINE)
re_test_name = re.compile(ur'TRACE,"executing (.*mdp)",', re.MULTILINE)
re_actual = re.compile(ur'TRACE,"Actual:', re.MULTILINE)
cramja /
Created Jun 10, 2016
This script removes unused header comments.
# This script removes unused header comments. Notice that the file locations are hard coded,
# so change that.
import subprocess as sp
import re
import os
def main():