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
'use strict'; | |
const requestAllPages = require('request-all-pages'); | |
var requestOpts = { | |
uri: 'https://api.github.com/orgs/ADD_YOUR_ORG_HERE/repos', | |
json: true, | |
body: {}, | |
headers: { | |
'User-Agent': 'request-all-pages', | |
'Authorization': 'Token ADD_YOUR_GITHUB_TOKEN_HERE' |
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
wget https://nodejs.org/dist/v4.6.1/node-v4.6.1-linux-armv7l.tar.gz | |
tar -xvf node-v4.6.1-linux-armv7l.tar.gz | |
cd node-v4.3.1-linux-armv7l | |
sudo cp -R * /usr/local/ | |
node –-version |
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 onoff = require('onoff'); //#A | |
var Gpio = onoff.Gpio, | |
led = new Gpio(4, 'out'), //#B | |
interval; | |
interval = setInterval(function () { //#C | |
var value = (led.readSync() + 1) % 2; //#D | |
led.write(value, function() { //#E | |
console.log("Changed LED state to: " + value); |
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
dojo.provide("cs.lib.evrythng.services.init"); | |
var proxyUrl = cs.config.evrythng.proxyUrl; | |
var thngUrl = proxyUrl + "/thngs/" + cs.config.evrythng.thng; | |
var evrythngMessage = "EVRYTHNG -- "; | |
//alert(thngUrl); | |
/** | |
* Read a property from the API | |
*/ |
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
#include "mbed.h" | |
#include "EthernetInterface.h" | |
#include "EvrythngApi.h" | |
#include "util.h" | |
DigitalOut coffeeRelay(p29); | |
DigitalOut espressoRelay(p28); | |
DigitalOut ethernetLed(LED1); |
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
upstream openerpweb { | |
server 127.0.0.1:8069 weight=1 fail_timeout=300s; | |
} | |
server { | |
listen 80; | |
server_name YOUR-PUBLIC-ADDRESS-HERE; | |
# Strict Transport Security | |
add_header Strict-Transport-Security max-age=2592000; |
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
sudo rm -rf /usr/local/bin/rcelasticsearch | |
sudo rm -rf /usr/local/share/elasticsearch/bin/service | |
sudo rm -rf /usr/local/share/elasticsearch | |
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.11.tar.gz -O elasticsearch.tar.gz | |
tar -xf elasticsearch.tar.gz | |
rm elasticsearch.tar.gz | |
sudo mv elasticsearch-* elasticsearch | |
sudo mv elasticsearch /usr/local/share |
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
import com.wordnik.swagger.jaxrs.JaxrsApiReader; | |
import javax.servlet.http.HttpServlet; | |
public class Bootstrap extends HttpServlet { | |
static { | |
JaxrsApiReader.setFormatString(""); | |
} | |
} |
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
## Versioning | |
* Version using [Semantic Versioning](http://semver.org/) spec. | |
## Code | |
### Formatting | |
* Use UTF-8. |