Skip to content

Instantly share code, notes, and snippets.

@Jazarro
Jazarro / nativescript-file-system-example
Last active October 19, 2016 12:07 — forked from mikebranstein/nativescript-file-system-example
NativeScript file-system module example
var fileSystemModule = require("file-system");
var fileName = "persistedFile.json";
var file = fileSystemModule.knownFolders.documents().getFile(fileName);
var data = [{"id": "1", "value": "NativeScript"}, ...];
// write data to the file, converted to a JSON string first
file.writeText(JSON.stringify(data));
// read data from the file
@Jazarro
Jazarro / Movilizer.d.ts
Created November 30, 2016 14:38
TypeScript definitions for the Movilizer.js file needed for Movilizer HTML5 views.
/**
* TypeScript definition file for the Movilizer.js file needed for Movilizer HTML5 views.
* The documentation in this file has been adapted from the documentation in the original Movilizer.js file,
* presumably written by Jesus de Mula Cano.
*
* @author Arjan Boschman
*/
/**
* This declares the global variable movilizer of type Movilizer. The class Movilizer is declared below.
import requests
import schedule
import time
import RPi.GPIO as GPIO
HTTP_PREFIX = 'http://'
BRIDGE_IP = '192.168.178.101'
API_PREFIX = '/api'
USERNAME = 'x-M0aZsE-oQVjKTpmv8EfbUKXcIW7S8kTXvX3Mlb'
GROUPS = '/groups'