This file contains hidden or 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 | |
| if [ -f /usr/local/bin/cf ] | |
| then | |
| version=`/usr/local/bin/cf -v | cut -d " " -f 3` | |
| echo 'Current version of cf installed is ' $version | |
| fi | |
| echo 'Downloading latest binary' | |
| curl http://go-cli.s3.amazonaws.com/cf-darwin-amd64.tgz -o cf-darwin-amd64.tgz -s | |
| echo 'Uncompressing...' | |
| tar -xf cf-darwin-amd64.tgz |
This file contains hidden or 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
| # Python sample to publish data to Aercloud | |
| # uses mosquitto Python API | |
| # see https://aeriscom.jira.com/wiki/display/DOCS/API+Reference#APIReference-MQTT | |
| # Andy Piper @andypiper November 2013 | |
| import json | |
| import mosquitto | |
| # define callbacks |
This file contains hidden or 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
| # Python sample to publish data to Aercloud | |
| # uses mosquitto Python API | |
| # see https://aeriscom.jira.com/wiki/display/DOCS/API+Reference#APIReference-MQTT | |
| # Andy Piper @andypiper November 2013 | |
| import json | |
| import mosquitto | |
| # define callbacks |
This file contains hidden or 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
| #!/usr/bin/python | |
| from pylcdsysinfo import BackgroundColours, TextColours, TextAlignment, TextLines, LCDSysInfo | |
| import mosquitto | |
| import textwrap | |
| import sys | |
| from time import sleep | |
| def on_message(mosq, obj, msg): | |
| if 'CC' in msg.topic: |
This file contains hidden or 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
| // Morse Code - USE MQTT! | |
| // based on a project from 30 Arduino Projects for the Evil Genius | |
| // thanks to Simon Monk | |
| // Andy Piper @andypiper, Nov 2013 | |
| int ledPin = 12; | |
| char* letters[] = { | |
| ".-", "-...", "-.-.", "-..", ".", "..-.", "--.", "....", "..", // A-I |
This file contains hidden or 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
| #!/usr/bin/env node | |
| 'use strict'; | |
| var nopt = require('nopt'); | |
| var url = require('url'); | |
| var mows = require('mows'); | |
| var opts = nopt({}); |
This file contains hidden or 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
| gcutil addfirewall mqtt --description="MQTT allowed." --allowed="tcp:1883" --project="your-project" |
This file contains hidden or 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
| w12:05:56.217 [main] DEBUG o.s.core.env.StandardEnvironment - Initializing new StandardEnvironment | |
| 12:05:56.225 [main] DEBUG o.s.core.env.StandardEnvironment - Adding [systemProperties] PropertySource with lowest search precedence | |
| 12:05:56.229 [main] DEBUG o.s.core.env.StandardEnvironment - Adding [systemEnvironment] PropertySource with lowest search precedence | |
| 12:05:56.229 [main] DEBUG o.s.core.env.StandardEnvironment - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment] | |
| 12:05:56.332 [main] INFO o.s.c.a.AnnotationConfigApplicationContext - Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@717a6926: startup date [Thu Feb 13 12:05:56 GMT 2014]; root of context hierarchy | |
| 12:05:56.333 [main] DEBUG o.s.c.a.AnnotationConfigApplicationContext - Bean factory for org.springframework.context.annotation.AnnotationConfigApplicationContext@717a6926: org.springframework.beans.factory.support.DefaultListableBeanFactory@18aaa1c3: defining beans [org.s |
This file contains hidden or 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
| #!/usr/bin/env ruby | |
| require "nats/client" | |
| NATS.start(:uri => "nats://nats:nats@10.244.0.6:4222") do | |
| NATS.subscribe('>') { |msg, reply, sub| puts "Msg received on [#{sub}] : '#{msg}'" } | |
| end |
This file contains hidden or 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
| $ cf-scale-demo git:(master) ✗ cf push largeapp -m 6G | |
| Updating app largeapp in org apiper-org / space development as apiper@gopivotal.com... | |
| OK | |
| Uploading largeapp... | |
| Uploading from: /Users/andyp/Development/cloudfoundry/cf-scale-demo | |
| 7.2K, 24 files | |
| OK | |
| Stopping app largeapp in org apiper-org / space development as apiper@gopivotal.com... |