This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Format for Selenium Remote Control Java client using the Firefox WebDriver | |
* Author: Brett Cave <[email protected]> | |
* 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"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var UpdatePull = function() { | |
events.EventEmitter.call(this); | |
} | |
util.inherits(UpdatePull, events.EventEmitter); | |
UpdatePull.prototype.pull = function() { | |
var self = this; | |
this.rsspull(function(result){ | |
_.each(result, (function(item){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs') | |
fs.exists("/path/to/some/file", function(exists) { | |
var foo = "bar" | |
if (exists) | |
foo = "foobar"; | |
module.exports = foo; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
libraryDependencies ++= { | |
if(!new java.io.File("project-module/lib/mylib-1.0.0.jar").exists) | |
Seq("com.org.mylib" % "mylib" % "1.0.0") | |
else | |
Seq() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[2013-11-13T12:17:31+00:00] INFO: Setting the run_list to ["recipe[java]", "recipe[foo::bar]", "recipe[some::thing]", "recipe[yack::foo]"] from JSON | |
[2013-11-13T12:17:31+00:00] INFO: Run List is [recipe[java], recipe[foo::bar], recipe[some::thing], recipe[yack::foo]] | |
[2013-11-13T12:17:31+00:00] INFO: Run List expands to [java, foo::bar, some::thing, yack::foo] | |
Recipe: yack::foo | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
get_file = ruby_block "get_file" do | |
block do | |
conn = Some::Remote.new("param") | |
remoteFile = conn.get("/path/to/file") | |
localFile = File.open("/tmp/test_secret_key",'w') | |
localFile.write(remoteFile.contents) | |
end | |
not_if { ::File.exists?("/tmp/test_secret_key") } | |
action :nothing | |
end |
NewerOlder