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
guard 'spork', :rspec_env => { 'RAILS_ENV' => 'test' } do | |
watch('config/application.rb') | |
watch('config/environment.rb') | |
watch(%r{^config/environments/.+\.rb$}) | |
watch(%r{^config/initializers/.+\.rb$}) | |
watch(%r{^config/locales/.+\.yml$}) | |
watch('Gemfile') | |
watch('Gemfile.lock') | |
watch('spec/spec_helper.rb') | |
end |
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
require 'rubygems' | |
require 'spork' | |
# This code runs once when you run your test suite | |
Spork.prefork do | |
ENV['RAILS_ENV'] ||= 'test' | |
# Mongoid models reload | |
require 'rails/mongoid' | |
Spork.trap_class_method(Rails::Mongoid, :load_models) |
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 <SPI.h> | |
#include <Ethernet.h> | |
#include <PubSubClient.h> | |
/* ------------------ */ | |
/* SKETCH CREDENTIALS */ | |
/* ------------------ */ | |
char* deviceId = "<DEVICE-ID>"; // * set your device id (will be the MQTT client username) |
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 <SPI.h> | |
#include <YunClient.h> | |
#include <PubSubClient.h> | |
char* deviceId = "<DEVICE-ID>"; | |
char* deviceSecret = "<DEVICE-SECRET>"; | |
char* outTopic = "devices/<DEVICE-ID>/set"; | |
char* inTopic = "devices/<DEVICE-ID>/get"; |
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"; | |
var fs = require('fs'); | |
var SFTPServer = require("node-sftp-server"); | |
var ReadableStreamClone = require("readable-stream-clone"); | |
// create the server | |
var srv = new SFTPServer({ | |
privateKeyFile: "./id_rsa", | |
temporaryFileDirectory: "./tmp" | |
}); |
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
/** | |
* | |
* OAuth usage example. | |
* | |
**/ | |
var http = require("http"); | |
var Url = require("url"); | |
var querystring = require("querystring"); |
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
{ | |
"id": "5735a694dcba0f0892824613", | |
"batch_id": "MARCASAR002", | |
"customer_id": "5731fdd2b3f30a687138ceea", | |
"uri": "http://admin.idcork.com/batches/5735a694dcba0f0892824613", | |
"code": null, | |
"description": null, | |
"article": null, | |
"quality": null, | |
"diameter": null, |
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
{ | |
"id": "5735a694dcba0f0892824613", | |
"batch_id": "MARCASAR002", | |
"customer_id": "5731fdd2b3f30a687138ceea", | |
"uri": "http://admin.idcork.com/batches/5735a694dcba0f0892824613", | |
"code": null, | |
"description": null, | |
"article": null, | |
"quality": null, | |
"diameter": null, |
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
in_topic = 'devices/' + device_id + '/get' # receiving messages | |
out_topic = 'devices/' + device_id + '/set' # publishing messages |
NewerOlder