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
package com.coinhiveminer; | |
import android.annotation.SuppressLint; | |
import android.content.Context; | |
import android.view.WindowManager.LayoutParams; | |
import android.webkit.JavascriptInterface; | |
import android.webkit.WebView; | |
import android.webkit.WebViewClient; | |
public class CoinHive { |
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
/* | |
Version 0.2 - Feb 15 2018 | |
*/ | |
#include <Arduino.h> | |
#include <ESP8266WiFi.h> | |
#include <ESP8266WiFiMulti.h> | |
#include <WebSocketsClient.h> // get it from https://github.com/Links2004/arduinoWebSockets/releases | |
#include <ArduinoJson.h> // get it from https://arduinojson.org/ or install via Arduino library manager |
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
DynamicJsonBuffer jsonBuffer(128); | |
JsonObject& root = jsonBuffer.createObject(); | |
root["action"] = "setPowerState"; | |
root["value"] = "ON"; | |
StreamString databuf; | |
root.printTo(databuf); | |
webSocket.sendTXT(databuf); | |
DynamicJsonBuffer jsonBuffer; |
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
import 'package:flutter/material.dart'; | |
import 'loadScreen.dart'; | |
class AsyncWidget extends StatefulWidget { | |
@override | |
_AsyncWidgetState createState() => _AsyncWidgetState(); | |
} | |
class _AsyncWidgetState extends State<AsyncWidget> { | |
Widget currentComponent; |
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
Step 1. Preparation | |
-------------------- | |
First take care of the dependencies for Android Application Development. | |
Dependencies are - | |
1. Java | |
2. ant | |
3. Eclipse and Android Development tools (IDE) | |
4. Android SDK and NDK | |
5. adb |
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 <Arduino.h> | |
#include <ESP8266WiFi.h> | |
#include <ESP8266WiFiMulti.h> | |
#include <WebSocketsClient.h> // https://github.com/kakopappa/sinric/wiki/How-to-add-dependency-libraries | |
#include <ArduinoJson.h> // https://github.com/kakopappa/sinric/wiki/How-to-add-dependency-libraries | |
#include <StreamString.h> | |
ESP8266WiFiMulti WiFiMulti; | |
WebSocketsClient webSocket; | |
WiFiClient client; |
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
import 'dart:convert'; | |
import 'package:intl/intl.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:fluids/plugins/weather/models/models.dart'; //custom data models | |
import 'package:fluids/utils/md_icons.dart'; //material design community icons | |
class CityForecast extends StatelessWidget { | |
final GlobalKey<AnimatedListState> _listKey = GlobalKey<AnimatedListState>(); | |
final String city; | |
final String state; |
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 <ESP8266WiFi.h> | |
#include <ESP8266WebServer.h> | |
#include <WiFiUdp.h> | |
#include <functional> | |
void prepareIds(); | |
boolean connectWifi(); | |
boolean connectUDP(); | |
void startHttpServer(); | |
void turnOnRelay(); |
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
//https://github.com/rcarmo/azure-iot-esp-01-minimal-cpp/blob/master/iothub.cpp | |
//http://bitoftech.net/2014/12/15/secure-asp-net-web-api-using-api-key-authentication-hmac-authentication/ | |
/* | |
var hmac = crypto.createHmac('sha256', secret_key); | |
hmac.update(request.body.message); | |
var signature = hmac.digest('hex')); | |
*/ | |
var str = payload_string; |
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
/** | |
* MongoDB NodeJS Driver Production Connection Example | |
* | |
* Copyright (c) 2015 ObjectLabs Corporation | |
* Distributed under the MIT license - http://opensource.org/licenses/MIT | |
*/ | |
var MongoClient = require('mongodb').MongoClient; | |
/** |