View Espruino Clicker
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
var kb = require("ble_hid_keyboard"); | |
var services = { | |
0x180a: { | |
0x2a50: { | |
value: [ | |
0x01, /* Use USB Vendor IDs */ | |
0xac, 0x05, /* Apple */ | |
0x5a, 0x02, /* Internal Keyboard */ | |
0x00, 0x00 |
View console.hex.js
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
console.hex = (d) => console.log((Object(d).buffer instanceof ArrayBuffer ? new Uint8Array(d.buffer) : | |
typeof d === 'string' ? (new TextEncoder('utf-8')).encode(d) : | |
new Uint8ClampedArray(d)).reduce((p, c, i, a) => p + (i % 16 === 0 ? i.toString(16).padStart(6, 0) + ' ' : ' ') + | |
c.toString(16).padStart(2, 0) + (i === a.length - 1 || i % 16 === 15 ? | |
' '.repeat((15 - i % 16) * 3) + Array.from(a).splice(i - i % 16, 16).reduce((r, v) => | |
r + (v > 31 && v < 127 || v > 159 ? String.fromCharCode(v) : '.'), ' ') + '\n' : ''), '')); |
View Duck.gltf
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
{ | |
"asset": { | |
"generator": "COLLADA2GLTF", | |
"version": "2.0" | |
}, | |
"scene": 0, | |
"scenes": [ | |
{ | |
"nodes": [ | |
0 |
View screenmirror-puck.js
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
var kb = require("ble_hid_keyboard"); | |
var services = { | |
0x180a: { | |
0x2a50: { | |
value: [ | |
0x01, /* Use USB Vendor IDs */ | |
0xac, 0x05, /* Apple */ | |
0x5a, 0x02, /* Internal Keyboard */ | |
0x00, 0x00 |
View geolocation.js
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
(function() { | |
if (navigator.geolocation) { | |
function PositionError(code, message) { | |
this.code = code; | |
this.message = message; | |
} | |
PositionError.PERMISSION_DENIED = 1; | |
PositionError.POSITION_UNAVAILABLE = 2; |
View gist:32c82a2b3b19df8a0f44
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
Consoles: | |
Xbox 360 - Internet Explorer 9 | |
Xbox One - Internet Explorer 10 | |
Sony PlayStation 3 - Netfront | |
Sony PlayStation 4 - Chromium based | |
Sony PlayStation TV - Netfront NX | |
Nintendo Wii - Opera 9.6, Presto | |
Nintendo Wii U - Netfront NX |
View Native app communication
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
I have a web app that needs to talk to point of sale hardware: receipt printers, customer displays, | |
cash drawers and payment terminals. Direct communication from the web app with these devices is | |
impossible, so I created a native app that can be installed on the computer that can talk to the | |
devices. The app runs a web server that exposes these devices using a REST api. | |
The native app registers itself upon startup with a webservice. It sends its own IP address on | |
the local network and the server also sees the external IP address of the network. The web app | |
sends a discovery request to the webservice and it receives all the local IP addresses which | |
have the same external IP address. |
View Sony
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
Sony devices ship with Google Chrome as the default browser. Google Chrome is baked | |
into the firmware of the device. Different versions of the firmware come with different | |
versions of Google Chrome. | |
Usually the version that comes with the firmware is updated using Google Play, however... | |
When first starting up the device Sony does not ask the user to log into Google Play. | |
This means that unless you manually open Google Play and log in, the devices does not | |
receive any updates using Google Play. In this case Google Chrome is only updated when | |
the user installs a firmware update. |
View LG Browser
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
Chromium 30 | |
458 / 555 | |
https://html5test.com/results/related/7c791b543cbd7705f547a0a30e5404cf.html | |
- G Pad 8.3 Android 4.4.2 | |
- G Pro 2 Android 4.4.2 | |
- G2 Android 4.4.2 | |
- G2 mini Android 4.4.2 | |
- L65 Android 4.4.2 | |
- L70 Android 4.4.2 |
View HTC Sense Browser
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
Note: All versions of the HTC Sense browser listed below send the following header: X-Requested-With: com.htc.sense.browser | |
Note: The difference between the two WebKit based versions are mostly which form field types are supported | |
Webkit | |
368 / 555 | |
https://html5test.com/results/related/127d2c84dc7e495a6ed4ddd8ceccac2a.html | |
NewerOlder