Skip to content

Instantly share code, notes, and snippets.

View jganoff's full-sized avatar

Jordan Ganoff jganoff

View GitHub Profile
#!/usr/bin/env bash
set -e
# How many days should this certificate be valid for?
DAYS_VALID_FOR=365
CONFIG_FILE=${CONFIG_FILE:-kubectl-config-$(date +%s)}
CLUSTER_NAME=${CLUSTER_NAME:-staging}
SERVER_ENDPOINT=${SERVER_ENDPOINT:-https://mycluster.example.com}

Keybase proof

I hereby claim:

  • I am jganoff on github.
  • I am jganoff (https://keybase.io/jganoff) on keybase.
  • I have a public key whose fingerprint is C7C7 14A3 D2FD DF7C 9A6B D5DA 5F14 B0D5 B38D 39C6

To claim this, I am signing this object:

@jganoff
jganoff / block.txt
Created March 2, 2017 07:03
InfluxDB Compaction Issue
--- contention:
cycles/second=2904016958
5238446103497 1804 @ 0x43cb0c 0x861de2 0x89a2e3 0x45f451
# 0x43cb0b runtime.selectgo+0x1b /usr/local/go/src/runtime/select.go:238
# 0x861de1 github.com/influxdata/influxdb/tsdb/engine/tsm1.(*Engine).compactTSMLevel+0x161 /root/go/src/github.com/influxdata/influxdb/tsdb/engine/tsm1/engine.go:989
# 0x89a2e2 github.com/influxdata/influxdb/tsdb/engine/tsm1.(*Engine).enableLevelCompactions.func4+0x72 /root/go/src/github.com/influxdata/influxdb/tsdb/engine/tsm1/engine.go:219
5238425708347 1804 @ 0x43cb0c 0x861de2 0x89a243 0x45f451
# 0x43cb0b runtime.selectgo+0x1b /usr/local/go/src/runtime/select.go:238
# 0x861de1 github.com/influxdata/influxdb/tsdb/engine/tsm1.(*Engine).compactTSMLevel+0x161 /root/go/src/github.com/influxdata/influxdb/tsdb/engine/tsm1/engine.go:989
@jganoff
jganoff / setup-node.sh
Last active August 29, 2015 14:13
PebbleJS in Node
# Clone PebbleJS' repo. This is the basis for all PebbleJS apps and includes
# libraries such as 'ajax', and 'ui'.
git clone git@github.com:pebble/pebblejs.git
# Tell Node where to find the PebbleJS modules
export NODE_PATH=$NODE_PATH:$(pwd)/pebblejs/js:$(pwd)/pebblejs/js/lib
# Pull down the XMLHttpRequest module into the current working directory.
# The 'ajax' module requires this.
npm install xmlhttprequest
@jganoff
jganoff / for-remote-topology-assembly.xml
Last active August 29, 2015 13:56
Kettle Storm topology jar with Janino support for the User Defined Java Class Step
<assembly>
<id>for-remote-topology</id>
<formats>
<format>jar</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<dependencySets>
<dependencySet>
<unpack>true</unpack>
<scope>runtime</scope>
private boolean closeETLTabs(boolean save) throws KettleException {
Spoon spoonInstance = Spoon.getInstance();
int numTabs = spoonInstance.delegates.tabs.getTabs().size();
for (int i = numTabs - 1; i >= 0; i--) {
spoonInstance.tabfolder.setSelected(i);
// Logic copied directly out of SpoonTabsDelegate.tabClose(). That needs to be refactored badly.
Object control = spoonInstance.tabfolder.getSelected().getControl();
// Save the changes if we're requested to and the control object is a tab item
if (save && control instanceof TabItemInterface) {
TabItemInterface tabItem = (TabItemInterface) control;
@jganoff
jganoff / gist:3229953
Created August 1, 2012 19:29
Pentaho Big Data Plugin: Hadoop Configuration Testing with ShrinkWrap and VFS
// Create a test hadoop configuration "a"
FileObject ramRoot = VFS.getManager().resolveFile(HADOOP_CONFIGURATIONS_PATH);
FileObject aConfigFolder = ramRoot.resolveFile("hadoop-configurations/a");
aConfigFolder.createFolder();
assertEquals(FileType.FOLDER, aConfigFolder.getType());
// Create the properties file for the configuration as hadoop-configurations/a/config.properties
FileObject configFile = aConfigFolder.resolveFile("config.properties");
Properties p = new Properties();
p.setProperty("name", "Test Configuration A");
@jganoff
jganoff / gist:2139471
Created March 20, 2012 18:38
Birthday Wish
puts "Happy Birthday, mojavelinux!"
package org.pentaho.hadoop.mapreduce.converter;
import org.pentaho.di.core.row.ValueMetaInterface;
/**
* Provides conversion between types
*
* @param <F> Type this converter can convert from
* @param <T> Type this converter can convert to
*/
public interface Report<T extends ReportDataSource, I extends ReportInstance> {
I fill(T dataSource, Map<String, Object> parameters) throws ReportException;
}