https://gist.github.com/honkskillet/bd1f72223dd8e06b5ce6
https://gist.github.com/zyxar/2317744
Exercise link
// No Security | |
{ | |
"rules": { | |
".read": true, | |
".write": true | |
} | |
} |
import 'package:cloud_firestore/cloud_firestore.dart'; | |
class DatabaseService<T> { | |
final String collection; | |
final Firestore _db = Firestore.instance; | |
final T Function(String, Map<String,dynamic>) fromDS; | |
final Map<String,dynamic> Function(T) toMap; | |
DatabaseService(this.collection, {this.fromDS,this.toMap}); | |
Future<T> getSingle(String id) async { | |
var snap = await _db.collection(collection).document(id).get(); | |
if(!snap.exists) return null; |
/* | |
IoT Manager mqtt device client https://play.google.com/store/apps/details?id=ru.esp8266.iotmanager | |
Based on Basic MQTT example with Authentication | |
PubSubClient library v 1.91.1 https://github.com/Imroy/pubsubclient | |
- connects to an MQTT server, providing userdescr and password | |
- publishes config to the topic "/IoTmanager/config/deviceID/" | |
- subscribes to the topic "/IoTmanager/hello" ("hello" messages from mobile device) | |
Tested with Arduino IDE 1.6.7 + ESP8266 Community Edition v 2.1.0-rc1 and PubSubClient library v 1.91.1 https://github.com/Imroy/pubsubclient | |
ArduinoJson library 5.0.7 https://github.com/bblanchon/ArduinoJson |
/* | |
IoT Manager mqtt device client https://play.google.com/store/apps/details?id=ru.esp8266.iotmanager | |
Based on Basic MQTT example with Authentication | |
PubSubClient library v 1.91.1 https://github.com/Imroy/pubsubclient | |
- connects to an MQTT server, providing userdescr and password | |
- subscribes to the topic "/IoTmanager" (waiting "HELLO" messages from mobile device) | |
- publishes config to the topic "/IoTmanager/config/deviceID/" | |
Tested with Arduino IDE 1.6.7 + ESP8266 Community Edition v 2.1.0-rc2 | |
PubSubClient library v 1.91.1 https://github.com/Imroy/pubsubclient |
/* | |
IoT Manager mqtt device client https://play.google.com/store/apps/details?id=ru.esp8266.iotmanager | |
Based on Basic MQTT example with Authentication | |
PubSubClient library v 1.91.1 https://github.com/Imroy/pubsubclient | |
- connects to an MQTT server, providing userdescr and password | |
- publishes config to the topic "/IoTmanager/config/deviceID/" | |
- subscribes to the topic "/IoTmanager/hello" ("hello" messages from mobile device) | |
Tested with Arduino IDE 1.6.6 + ESP8266 Community Edition v 2.0.0-stable and PubSubClient library v 1.91.1 https://github.com/Imroy/pubsubclient | |
ESP8266 Community Edition v 2.0.0-stable have some HTTPS issues. Push notification temporary disabled. |
/* | |
IoT Manager mqtt device client https://play.google.com/store/apps/details?id=ru.esp8266.iotmanager | |
Based on Basic MQTT example with Authentication | |
PubSubClient library v 1.91.1 https://github.com/Imroy/pubsubclient | |
- connects to an MQTT server, providing userdescr and password | |
- publishes config to the topic "/IoTmanager/config/deviceID/" | |
- subscribes to the topic "/IoTmanager/hello" ("hello" messages from mobile device) | |
Tested with Arduino IDE 1.6.6 + ESP8266 Community Edition v 2.0.0-stable and PubSubClient library v 1.91.1 https://github.com/Imroy/pubsubclient | |
ESP8266 Community Edition v 2.0.0-stable have some HTTPS issues. Push notification temporary disabled. |
//document.querySelector("#riwayat > table > tbody > tr:nth-child(1) > td:nth-child(3) > span").textContent [untuk get text DOM] | |
//https://converter.telerik.com [convert c# to VB (static web language] | |
// bahasa pemprograman static/AOT/compile bisa di convert. beda dengan bahasa pemprotaman compile sambil running (JIT) | |
//https://github.com/kblok/netconfar-puppeteer-sharp-demo | |
private async Task<DtoEst> LoadXXXAsync() | |
{ | |
// downloads chromium to the local project, needed by Puppeteer Sharp for execution, takes about 2 min! | |
await new BrowserFetcher().DownloadAsync(BrowserFetcher.DefaultRevision); |
using System; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using PuppeteerSharp; | |
using System.Collections.Generic; | |
namespace netDemo | |
{ | |
public class Program | |
{ |