View KMEx2InConverter.js
var fs = require("fs"), | |
API_KEY = "MY_API_KEY"; | |
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" |
View java-rc-junit4-custom.js
/* | |
* Format for Selenium Remote Control Java client using the Firefox WebDriver | |
* Author: Brett Cave <brett@jemstep.com> | |
* Date: Fri May 06, 2011 | |
*/ | |
var subScriptLoader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"].getService(Components.interfaces.mozIJSSubScriptLoader); | |
subScriptLoader.loadSubScript('chrome://selenium-ide/content/formats/remoteControl.js', this); | |
this.name = "java-rc-junit4-custom"; |
View output.log
$ cat runner.sh | |
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... |
View gist:70d13cfaa58d6ef160e1
a = bash "apt-get update" do | |
user "root" | |
code <<-EOF | |
add-apt-repository ppa:cwchien/gradle | |
apt-get update | |
EOF | |
action :nothing | |
end | |
a.run_action :run |
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", |
View gist:6087089
gem_package "gem" do | |
action :install | |
done | |
r = gempackage "gem" do | |
action :nothing | |
done | |
r.runaction(:install) |
View gist:6103434
include_recipe "apt" | |
package_list = ["ruby1.9.1-dev","make", " libxml2-dev" ] | |
package_list.each do |pkg| | |
r = package pkg do | |
action :install | |
## action :nothing | |
end | |
## r.runaction(:install) | |
end |
View gist:6104137
r = recipe "apt::default" do | |
action :nothing | |
done | |
r.run_action(:execute) |
View gist:6112224
g = chef_gem "somegem" do | |
action :nothing | |
end | |
g.run_action(:install) | |
require 'somegem' | |
# Works | |
#### |
View gist:6184116
Environment: <%= @environment %> | |
<% if @environment == "PROD" %> | |
noThen {} | |
<% end %> | |
<% if @environment == "PROD" then %> | |
withThen {} | |
<% end %> |
OlderNewer