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
$this.bind('touchmove', function(event){ | |
var touchDiffY = event.originalEvent.changedTouches[0].screenY - data.startY; | |
var x = data.startX - event.originalEvent.touches[0].pageX; | |
var y = data.startY = touchDiffY; | |
var r = Math.atan2(y,x); | |
var angle = Math.round(r*180/Math.PI); | |
//angle = 360 - Math.abs(angle); |
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
window.onkeydown = function(event){ | |
keyboard.press(event.keyCode); | |
} | |
}()); | |
var $panes = $(".waypoint").length-1; | |
var $currentPane = $(".waypoint").first(); | |
var keyboard = { | |
press:function(keycode){ | |
console.log(keycode); |
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
-webkit-touch-callout: none; | |
-webkit-user-select: none; | |
-khtml-user-select: none; | |
-moz-user-select: none; | |
-ms-user-select: none; | |
user-select: none; |
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
self.check_collision = function(x1, y1, w1, h1, x2, y2, w2, h2) { | |
w2 += x2; | |
w1 += x1; | |
if (x2 > w1 || x1 > w2) return false; | |
h2 += y2; | |
h1 += y1; | |
if (y2 > h1 || y1 > h2) return false; | |
return true; | |
} |
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
$ingredientSearch.on 'blur', (event) => | |
if (!$(document.activeElement).is($('.tt-dropdown-menu'))) | |
$window.unbind 'keydown' | |
$ingredientSearch.attr('placeholder',SouthernComfort.translations.drink_maker.add_ingredient) | |
$("#ingredient_search_area .tt-hint").html('') | |
$ingredientSearch.val('') | |
$("#search_icon").html('S').removeClass('active') | |
setTimeout => | |
$("#ingredient_search_area .tt-query").typeahead("setQuery","") |
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
$(".preload").each( function(){ | |
var image_path = $(this).data('image') | |
$(this).imgur({ | |
img: image_path | |
}, function(el, data){ | |
$(el).css({ | |
'background-image': 'url('+data+)' | |
}) | |
}) |
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
/** | |
* Copyright 2013-2014, Facebook, Inc. | |
* All rights reserved. | |
* | |
* This source code is licensed under the BSD-style license found in the | |
* LICENSE file in the root directory of this source tree. An additional grant | |
* of patent rights can be found in the PATENTS file in the same directory. | |
* | |
* @providesModule React | |
*/ |
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
env EDITOR=nano crontab -e | |
0 12 1 4 * curl -s http://www.gutenberg.org/cache/epub/84/pg84.txt |say & |
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
app.on('ready', function() { | |
var Screen = require('screen'); | |
var size = Screen.getPrimaryDisplay().size; | |
var width = size.width; | |
var height = size.height; | |
// Create the browser window. |
OlderNewer