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
/* | |
WiFi Web Server LED Blink | |
A simple web server that lets you blink an LED via the web. | |
This sketch will print the IP address of your WiFi Shield (once connected) | |
to the Serial monitor. From there, you can open that address in a web browser | |
to turn on and off the LED on pin 5. | |
If the IP address of your shield is yourAddress: | |
http://yourAddress/H turns the LED on |
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
let headers = document.getElementsByTagName('header') || [] | |
for (var x in headers) { | |
headers[x].remove ? headers[x].remove() : '' | |
} | |
let footers = document.getElementsByTagName('footer') || [] | |
for (var x in footers) { | |
footers[x].remove ? footers[x].remove() : '' | |
} | |
let banners = document.getElementsByClassName('banner') || [] | |
for (var x in banners) { |
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
const qr = ((_) => { | |
let _status = false; | |
let video; | |
let intv; | |
let start_scan = function (callback) { | |
window_status = "scan"; | |
bottom_bar("", "", ""); | |
document.getElementById("qr-screen").style.display = "block"; |
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 XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest; // https://www.npmjs.com/package/xmlhttprequest | |
var X2JS = require("x2js"); // https://www.npmjs.com/package/x2js | |
var deparam = require("deparam"); // https://www.npmjs.com/package/deparam | |
var xhr = function(method, url, data={}, query={}, headers={}) { | |
return new Promise((resolve, reject) => { | |
var xhttp = new XMLHttpRequest({ mozSystem: true }); | |
var _url = new URL(url); | |
for (var y in query) { | |
_url.searchParams.set(y, query[y]); |
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
const Todoist = (function() { | |
function Todoist(options, onComplete) { | |
this.syncData = {}; | |
this.onComplete = onComplete != null && typeof onComplete === "function" ? onComplete : null; | |
this.init(options); | |
} | |
Todoist.prototype.init = function(options, onComplete) { | |
this.accessToken = options.access_token; |
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
const DataStorage = (function() { | |
const SDCARD = navigator.getDeviceStorage('sdcard'); | |
function DataStorage(onChange) { | |
this.init(onChange); | |
} | |
DataStorage.prototype.init = function(onChange) { | |
this.trailingSlash = ''; |
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 React from 'react' | |
import ReactDOM from 'react-dom' | |
import RadioBtn from './radiobtn' | |
class RadioGrp extends React.Component { | |
componentDidMount() { | |
document.activeElement.addEventListener('keydown', this.handleKeydown); | |
const items = document.querySelectorAll('.items'); | |
console.log('Items - ', items) |
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 React, { Component } from 'react' | |
import { Button, Modal } from 'react-bootstrap'; | |
import { RadioGroup, RadioButton } from 'react-radio-buttons'; | |
import RadioOptions from './radiooptions' | |
class Page4 extends Component { | |
componentDidMount() { | |
document.addEventListener('keydown', this.handleKeydown); | |
const items = document.querySelectorAll('.items'); |
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
window.addEventListener("load", function() { | |
console.log("Loaded screen updated") | |
var deviceFound; | |
var writeCharacteristic; | |
var readCharacteristic; | |
if (navigator.mozBluetooth !== undefined) { | |
console.log("Not undefined") |
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
window.addEventListener("load", function() { | |
var deviceFound; | |
if (navigator.mozBluetooth !== undefined) { | |
navigator.mozBluetooth.onattributechanged = function() { | |
console.log('onattributechanged'); | |
} |