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 | |
# Find a value in simple JSON object from a key | |
# $1: key to find | |
# $2: JSON | |
find() { | |
for i in $(echo $2 | tr "," "\n"); do | |
i=`echo $i | sed "s/{//g" | sed "s/}//g" | sed "s/\"//g"` | |
set=($(echo $i | tr ":" "\n")) | |
if [ "$1" == "${set[0]}" ]; then |
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 | |
# TODO: Add arg to get path | |
path_to_new_dse_dir=/Users/franklovecchio/Desktop/development/dse | |
handle_args() { | |
} | |
# $1: path |
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
#include <SPI.h> | |
#include <PubSubClient.h> | |
#include <Ethernet.h> | |
/* | |
* m2m.io Client App | |
* | |
* Client application for m2m.io M2M platform. | |
* | |
* Client handles provioning as well as provides a template |
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
/**************************************************************************** | |
* Program/file: Main.c | |
* | |
* Copyright (C) by RTX A/S, Denmark. | |
* These computer program listings and specifications, are the property of | |
* RTX A/S, Denmark and shall not be reproduced or copied or used in | |
* whole or in part without written permission from RTX A/S, Denmark. | |
* | |
* DESCRIPTION: Co-Located Application (COLA). | |
* |
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
import org.eclipse.paho.client.mqttv3.MqttCallback; | |
import org.eclipse.paho.client.mqttv3.MqttClient; | |
import org.eclipse.paho.client.mqttv3.MqttConnectOptions; | |
import org.eclipse.paho.client.mqttv3.MqttDeliveryToken; | |
import org.eclipse.paho.client.mqttv3.MqttException; | |
import org.eclipse.paho.client.mqttv3.MqttMessage; | |
import org.eclipse.paho.client.mqttv3.MqttTopic; | |
public class SimpleMqttClient implements MqttCallback { |
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
var text = '<br/><br/>Copyright © 2013 2lemetry, LLC<br/><br/>All rights reserved.<br/><br/>Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:<br/><br/>Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.<br/><br/>Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.<br/><br/>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT O |
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
package io.m2m.simplemqttclient; | |
import java.util.concurrent.ConcurrentLinkedQueue; | |
import org.eclipse.paho.client.mqttv3.MqttMessage; | |
public class MessagePrinter implements Runnable { | |
ConcurrentLinkedQueue<MqttMessage> myQ; | |
MessagePrinter(ConcurrentLinkedQueue<MqttMessage> q) { | |
myQ = q; |
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
#include <SPI.h> | |
#include <PubSubClient.h> | |
#include <WiFi.h> | |
#include <Timer.h> | |
#define M2MIO_USERNAME "<2lemetry platform username>" | |
#define M2MIO_PASSWORD "<MD5 hash of 2lemetry password>" | |
#define M2MIO_DOMAIN "<domain on 2lemetry platform>" | |
#define M2MIO_STUFF "arduino" | |
#define M2MIO_DEVICE_ID "teslamqtt" |
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
#include <SPI.h> | |
#include <PubSubClient.h> // from http://knolleary.net/arduino-client-for-mqtt/ | |
#include <Ethernet.h> | |
#include "Timer.h" | |
#define M2MIO_USERNAME "<username on 2lemetry platform>" | |
#define M2MIO_PASSWORD "<MD5 hash of password (32 characters)>" | |
#define M2MIO_DOMAIN "<domain on 2lemetry platform (found in developer portal)>" | |
#define M2MIO_STUFF "rangefinders" | |
#define M2MIO_DEVICE_ID "device1" |
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
[ | |
{ | |
"nms": 1412638168724, | |
"location": "39.09972,-94.57853", | |
"geoJSON": { | |
"type": "Point", | |
"coordinates": [ | |
-94.57853, | |
39.09972 | |
] |
OlderNewer