I hereby verify my online identiy. Last updated: 06-may-2017 20:48
Sijmen Huizenga
Born in March 1997
Mail [email protected]
func zipDirectory(zipfilename string) error { | |
outFile, err := os.Create(zipfilename) | |
if err != nil { | |
return err | |
} | |
w := zip.NewWriter(outFile) | |
if err := addFilesToZip(w, zipfilename, ""); err != nil { | |
_ = outFile.Close() |
### Keybase proof | |
I hereby claim: | |
* I am sijmenhuizenga on github. | |
* I am sijmenhuizenga (https://keybase.io/sijmenhuizenga) on keybase. | |
* I have a public key ASAIdPnfNrc0hwu4CMarOQWhbSV8I2lWskXmT3XH8-MsDQo | |
To claim this, I am signing this object: |
-- Fork of https://github.com/brianvanburken/elm-playground/tree/master/ricky-elm | |
port module Main exposing (main) | |
import Html exposing (Html) | |
import Html.Attributes as Attribute | |
import Html.Events as Event | |
import Http | |
import Parser exposing ((|.), (|=), Count(..), Parser, ignore, int, keep, keyword, map, oneOf, oneOrMore, succeed, symbol, zeroOrMore) | |
import Regex exposing (HowMany(..)) |
/** | |
* This mysensor node will turn a relais on for 5 seconds upon receiving a V_STATUS message. This will trigger some firework! | |
* To ignite the firework send the following message to the gateway: | |
* 17;18;1;1;2;1 | |
*/ | |
#define MY_DEBUG | |
#define MY_RADIO_NRF24 |
#define MY_MQTT_USER "" | |
#define MY_MQTT_PASSWORD "" | |
#define MY_CONTROLLER_URL_ADDRESS "" | |
#define MY_PORT 1234 | |
#define MY_DEBUG | |
#define MY_RADIO_NRF24 | |
#define MY_GATEWAY_MQTT_CLIENT | |
#define MY_MQTT_PUBLISH_TOPIC_PREFIX "shome-out" | |
#define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX "shome-in" |
//find the range of the value of a field by its id in JSON or NULL if not found. example: | |
// field "id" //including the " chars! | |
// json {"id": 417} | |
// response {7,9} | |
// String values are returned excluding their surrounding " | |
// This only works for single level json and array's are not supported. | |
int *findJsonFieldRange(const char *json, const char *field) { | |
int jsoni = 0; | |
int fieldi = 0; |
#define MY_DEBUG | |
#define MY_RADIO_NRF24 | |
#define MY_RF24_CHANNEL 69 | |
#define MY_NODE_ID 0 | |
#define MY_GATEWAY_SERIAL | |
#include <MySensors.h> | |
#define PONGNODEID 15 |
/** | |
* Use a LSM303 to detect movement. When the chip moves than a song is played! | |
* | |
* To compile requires `piches.h` that is found here: https://www.arduino.cc/en/Tutorial/toneMelody | |
* And the LSM303 Library is required: https://github.com/pololu/lsm303-arduino | |
*/ | |
#include <Wire.h> | |
#include <LSM303.h> | |
#include "pitches.h" |
# Add to `crontab -e`: | |
# @hourly /home/pi/updateip.sh > /home/pi/.ip-log.txt | |
# @reboot sleep 30 && /home/pi/updateip.sh > /home/pi/.ip-log.txt | |
IP=`curl -s http://api.ipify.org/` | |
if [ -f $HOME/.ip.txt ]; then | |
OLD_IP=`cat $HOME/.ip.txt` | |
else | |
echo "No file, need IP" |
I hereby verify my online identiy. Last updated: 06-may-2017 20:48
Sijmen Huizenga
Born in March 1997
Mail [email protected]