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
class test1( | |
$servicex = "sonar", | |
$logfoldera = "${homex}/logs", | |
$logfoldere = "${homey}/logs", | |
$logfolderh = "${homez}/logs", | |
$logfolder = "${homex}/logs", | |
$homex = "/var/${servicex}", | |
$homey = "/var/${servicex}", | |
$homez = "/var/${servicex}") { |
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
Iterable<Module> modules = ImmutableSet.<Module> of( new SshjSshClientModule() ); | |
ContextBuilder builder = ContextBuilder.newBuilder( "stub" ).credentials( "x", "y" ).modules( modules ); | |
builder.buildView( ComputeServiceContext.class ).getComputeService(); | |
com.google.inject.CreationException: Guice creation errors: | |
1) A binding to org.jclouds.predicates.SocketOpen was already configured at org.jclouds.sshj.config.SshjSshClientModule.configure(SshjSshClientModule.java:48). | |
at org.jclouds.compute.stub.config.StubComputeServiceDependenciesModule.socketOpen(StubComputeServiceDependenciesModule.java:116) |
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
// Initializing variables | |
// url to post to. If using ninjablocks this is a webhook you created in the dashboard | |
var url = "https://api.ninja.is/rest/v0/device/WEBHOOK_0_0_108/subdevice/fIOAY/tickle/xxxxxxxxxxx"; | |
// the wifi SSID | |
var ssid = "myhomewifi"; | |
// how often to trigger the POST | |
var seconds = 5*60; | |
var method = "POST"; |
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
Parse.Cloud.define("hello", function(request, response) { | |
var xivelyKey = 'YOUR XIVELY KEY'; | |
var feedId = 713578059; | |
var device = request.params.D; | |
var channels = { | |
31: 'Temperature', | |
30: 'Humidity' | |
}; | |
var channel = channels[device]; |
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
#!/bin/bash | |
# Change .deb control file and repackage | |
# credits Loevborg http://ubuntuforums.org/showthread.php?t=636724&p=3925729#post3925729 | |
if [[ -z "$1" ]]; then | |
echo "Syntax: $0 debfile" | |
exit 1 | |
fi |
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
# test conversion of Java objects to json in JRuby | |
# jrjackson is the only gem doing it right, the others quote the result | |
# the trick for the other ones is to convert maps and lists to ruby hashes and arrays before | |
array = java.util.ArrayList.new().to_array | |
list = java.util.ArrayList.new() | |
map = java.util.HashMap.new() | |
nested = { :list => list } | |
require 'jrjackson' |
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
#!/bin/sh | |
# kill it all!!! | |
#docker ps | awk '{print $1}' | grep -v CONTAINER | xargs docker kill | |
docker rm $(docker ps -a -q) | |
docker rmi $(docker images | grep "^<none>" | awk '{print $3}') |
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
$ ./cluster/kubecfg.sh list pods | |
ID Image(s) Host Labels Status | |
---------- ---------- ---------- ---------- ---------- | |
jenkins csanchez/jenkins-swarm:1.565.3 10.245.2.3/10.245.2.3 name=jenkins Running | |
2efdcb34-5096-11e4-8260-0800279696e1 csanchez/jenkins-swarm-slave:1.20 10.245.2.2/10.245.2.2 name=jenkins-slave,replicationController=jenkins-slave Running | |
$ vagrant suspend | |
==> master: Saving VM state and suspending execution... | |
==> minion-1: Saving VM state and suspending execution... | |
==> minion-2: Saving VM state and suspending execution... |
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
$ ./cluster/kubecfg.sh list pods | |
Name Image(s) Host Labels Status | |
---------- ---------- ---------- ---------- ---------- | |
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
FROM ansible/centos7-ansible:stable | |
# or, for example, FROM ansible/ubuntu14.04-ansible:stable | |
RUN yum install -y tar | |
RUN ansible-galaxy install geerlingguy.java | |
RUN ansible-galaxy install https://github.com/silpion/ansible-maven.git | |
# Add playbooks to the Docker image | |
COPY site.yml / |
OlderNewer