Skip to content

Instantly share code, notes, and snippets.

View autonome's full-sized avatar

Dietrich Ayala autonome

View GitHub Profile
@autonome
autonome / aframe-orientation-firefox-android.md
Created June 30, 2017 16:45
A-Frame orientation bug on Firefox Android

A-Frame orientation bug on Firefox Android

A-Frame no longer responds to device motion on Firefox on Android after Firefox version 53.

Cause

Kip removed Cardboard support in bug 1250244, which caused the problem. However, A-Frame orientation still works on other non-WebVR non-Cardboard mobile browsers.

Why doesn't the WebVR polyfill kick in and wire up orientation API support?

diff -U 8 Carthage/Checkouts.bak/magnet-scanner-ios/MagnetScannerIOS/ScannerBle.swift Carthage/Checkouts/magnet-scanner-ios/MagnetScannerIOS/ScannerBle.swift
--- Carthage/Checkouts.bak/magnet-scanner-ios/MagnetScannerIOS/ScannerBle.swift 2016-10-10 20:59:47.000000000 -0700
+++ Carthage/Checkouts/magnet-scanner-ios/MagnetScannerIOS/ScannerBle.swift 2016-10-10 22:37:29.000000000 -0700
@@ -48,17 +48,17 @@
centralManager.stopScan()
}
deinit {
stop()
}
@autonome
autonome / openChromeTabInFirefox
Last active July 8, 2016 00:02
Applescript to open Chrome active tab in Firefox and Safari
(*
To install:
1. Open Script Editor
2. Copy the code below into the editor
3. File > Save > Choose type "application"
4. Give a name you'll remember like "openChromeURLInFirefox"
5. Save to your Applications directory (so it can be indexed by Spotlight)
@autonome
autonome / gist:8e4cdc2c0510040db5a8
Created March 4, 2016 23:33
average volume reporter
function start() {
navigator.mediaDevices.getUserMedia({ audio: true})
.then(onMediaStreamHandler)
.catch(function(error) {
console.log('getUserMedia error: ', err);
});
}
function onMediaStreamHandler(stream) {
stream.onactive = function(e) { console.log('stream active', e) };

Keybase proof

I hereby claim:

  • I am autonome on github.
  • I am dietrich (https://keybase.io/dietrich) on keybase.
  • I have a public key whose fingerprint is 0D3A 9BB7 4CC7 6121 B206 E43F C4B9 31F0 D785 52B2

To claim this, I am signing this object:

twerkworker:gaia dietrich$ APP=keyboard make test-integration
rm -rf profile profile-debug profile-test profile-gaia-test-b2g profile-gaia-test-firefox profile-raptor profile-test /Users/dietrich/Dropbox/moz/gaia/build_stage docs minidumps
Test SDK directory: /Users/dietrich/Dropbox/moz/gaia/b2g_sdk/39.0a1-2015-03-05-16-02-02
test -f /Users/dietrich/Dropbox/moz/gaia/b2g_sdk/39.0a1-2015-03-05-16-02-02/B2G.app/Contents/MacOS/xpcshell
[rebuild] rebuildAppDirs: ["/Users/dietrich/Dropbox/moz/gaia/apps/bluetooth","/Users/dietrich/Dropbox/moz/gaia/apps/bookmark","/Users/dietrich/Dropbox/moz/gaia/apps/calendar","/Users/dietrich/Dropbox/moz/gaia/apps/callscreen","/Users/dietrich/Dropbox/moz/gaia/apps/camera","/Users/dietrich/Dropbox/moz/gaia/apps/clock","/Users/dietrich/Dropbox/moz/gaia/apps/collection","/Users/dietrich/Dropbox/moz/gaia/apps/communications","/Users/dietrich/Dropbox/moz/gaia/apps/costcontrol","/Users/dietrich/Dropbox/moz/gaia/apps/default_theme","/Users/dietrich/Dropbox/moz/gaia/apps/download","/Users/
/* Manifest snippets */
"type": "privileged",
"permissions": {
"alarms": {
"description": "Required to schedule alarms"
}
},
"messages": [
{ "alarm": "/index.html" }
Verifying I am +dietrich on my passcard. https://onename.com/dietrich
@autonome
autonome / content-kit-template.md
Created March 17, 2015 22:15
Content Kit Template

Thing Content Kit

Current as of Thing 0.2.4

Introduction

  • One sentence description of thing and its purpose
  • Who/where/what/when/why
@autonome
autonome / webspeechwrapper.js
Last active August 29, 2015 14:14
Web Speech API utility
function say(phrase) {
speechSynthesis.speak(new SpeechSynthesisUtterance(phrase));
}
// words: array of strings
function addSpeech(words) {
var speechrecognitionlist = new SpeechGrammarList();
speechrecognitionlist.addFromString(
"#JSGF V1.0; grammar test; public <simple> = " +
words.join(' | ') + ' ;', 1);