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 { Audio } from 'expo-av'; | |
import { AssetLibrary } from '../AssetLibrary'; | |
/** | |
* Factory function to create sound sprites. | |
* | |
* Takes configuration object on init. | |
* | |
* Once configured a key can be played like so | |
* spriteInstance.play('validKeyDefinedInConfig')' |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
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
/* | |
by Martin Güther @magegu | |
just call it: | |
uploadFile(absoluteFilePath, callback); | |
*/ | |
var path = require('path'); | |
var async = require('async'); |
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
// skipping the imports of Cu and AddonManager here: | |
// get an addon pointer | |
var addon; | |
AddonManager.getAddonByID('@idea-town-addon', function(x) { addon = x; }); | |
// get the local machine's file path of the addon | |
var addonURI = addon.getResourceURI().asciiSpec; | |
// ugh, wrap the `file:///` URI in a `jar:///` URI, | |
// to get access to the metrics.jsm file inside the zipped idea town xpi. | |
// figured this out after a long search in dxr: |
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 Icon from 'react-fa' | |
import hoverable from 'lib/hocs/hoverable' | |
import instyled, { flatKeyed } from 'instyled' | |
import cascade from 'cascade' | |
export const EditButton = hoverable( | |
instyled( | |
flatKeyed( | |
cascade({ | |
position: 'absolute', |
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 audioContextCheck() { | |
if (typeof Services.appShell.hiddenDOMWindow.AudioContext !== 'undefined') { | |
return new Services.appShell.hiddenDOMWindow.AudioContext(); | |
} else if (typeof Services.appShell.hiddenDOMWindow.mozAudioContext !== 'undefined') { | |
return new Services.appShell.hiddenDOMWindow.mozAudioContext(); | |
} else { | |
throw new Error('AudioContext not supported'); | |
} | |
} |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
NewerOlder