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
/** | |
* Extending AirConsole with useful helper functions | |
* Include this script after the AirConsole API | |
* @author francois@n-dream.com | |
*/ | |
(function() { | |
if (!window['AirConsole']) { | |
throw "AirConsole is not defined. Did you not include the API file?"; |
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
/** | |
* EventHandler.js | |
* | |
* @description Extends object with .on(), .off() and .emit() methods | |
* @author: francois@n-dream.com | |
* @constructor | |
* @param {Object} source - The object to extend with events | |
*/ | |
var EventHandler = function() { |
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
### GIT ### | |
# Show not merged branches | |
alias gitnotmerged="git branch --no-merged master" | |
# Delete all merged branches | |
alias gitclean='git branch --merged | grep -v "\*" | xargs -n 1 git branch -d' | |
# Update all submodules | |
alias gitupdatesub="git submodule foreach git pull origin master" |
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
/** | |
* @author Francois Weber - V 1.0 | |
* Reading device motion to use phone as 'hammer' | |
* | |
* How to: | |
* var hammer = new DeviceHammer(); | |
* // Overwrite: | |
* hammer.onHit = function() { yourCode() }; | |
* | |
* @param {Object} options |
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
<html> | |
<head> | |
<script type="text/javascript" | |
src="https://www.airconsole.com/api/airconsole-1.7.0.js"></script> | |
<script type="text/javascript"> | |
navigator.vibrate = (navigator.vibrate || | |
navigator.webkitVibrate || | |
navigator.mozVibrate || | |
navigator.msVibrate); |