Skip to content

Instantly share code, notes, and snippets.


Brett cave brettcave

View GitHub Profile
brettcave / role-just-java.json
Last active Aug 29, 2015
role to install java 7
View role-just-java.json
"name": "just-java",
"description": "Installs Java 7",
"chef_type": "role",
"json_class": "Chef::Role",
"override_attributes": {
"java": {
"jdk_version" : "7",
"java_home" : "/usr/java/latest",
"install_flavor": "oracle",
brettcave / gist:70d13cfaa58d6ef160e1
Created Jun 25, 2014
apt-get workaround for build-essential
View gist:70d13cfaa58d6ef160e1
a = bash "apt-get update" do
user "root"
code <<-EOF
add-apt-repository ppa:cwchien/gradle
apt-get update
action :nothing
a.run_action :run
View output.log
$ cat
cd /opt/chef-zero
chef-client -z -c solo.rb -o 'role[someRole]' -E BUILD > chef-zero.log 2>&1
$ cat chef-zero.log
[2014-06-11T10:31:28+00:00] INFO: Auto-discovered chef repository at /opt/chef-zero
[2014-06-11T10:31:29+00:00] INFO: Starting chef-zero on port 8889 with repository at repository at /opt/chef-zero
One version per cookbook
[2014-06-11T10:31:29+00:00] INFO: Forking chef instance to converge...
brettcave / java-rc-junit4-custom.js
Created Mar 12, 2014
Custom Java / JUnit formatter for selenium
View java-rc-junit4-custom.js
* Format for Selenium Remote Control Java client using the Firefox WebDriver
* Author: Brett Cave <>
* Date: Fri May 06, 2011
var subScriptLoader = Components.classes[";1"].getService(Components.interfaces.mozIJSSubScriptLoader);
subScriptLoader.loadSubScript('chrome://selenium-ide/content/formats/remoteControl.js', this); = "java-rc-junit4-custom";
brettcave / KMEx2InConverter.js
Created Feb 3, 2014
nodejs kissmetrics export to import converter
View KMEx2InConverter.js
var fs = require("fs"),
function parseResults(filename) {
fs.readFile(filename, 'utf-8', function (err, fileContents) {
if (err) throw err;
var parsedJson = JSON.parse(fileContents);
for (element in parsedJson) {
var params = "?_k=" + API_KEY + "&_d=1"
You can’t perform that action at this time.