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
// creates a global "addWheelListener" method | |
// example: addWheelListener( elem, function( e ) { console.log( e.deltaY ); e.preventDefault(); } ); | |
(function(window,document) { | |
var prefix = "", _addEventListener, onwheel, support; | |
// detect event model | |
if ( window.addEventListener ) { | |
_addEventListener = "addEventListener"; | |
} else { |
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
for file in `ls *.scss`; | |
do | |
n="$(echo $file | sed 's/^\(.*\).scss$/\1.sass/')"; | |
sass-convert $file $n; | |
rm $file; | |
done |
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
// http://stackoverflow.com/a/901144 | |
function getParameterByName(name, url) { | |
if (!url) url = window.location.href | |
name = name.replace(/[\[\]]/g, "\\$&") | |
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), | |
results = regex.exec(url) | |
if (!results) return null | |
if (!results[2]) return '' | |
return decodeURIComponent(results[2].replace(/\+/g, " ")) | |
} |
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
$base-font-size: 10px | |
$touch-device-font-size: 15px | |
// The main font color controls the color of the text and the icons (font icons) | |
$main-font-color: #cccccc | |
// e.g. rgb(255, 255, 255) or #ffffff | |
// The default color of control backgrounds is mostly black but with a little | |
// bit of blue so it can still be seen on all black video frames, which are |
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: ZetCoby | |
http://stackoverflow.com/a/30376660/3708754 | |
*/ | |
var tools = { | |
/** | |
* | |
* Used to get the length of a rect | |
* |
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 getCoordinates($lat, $lng){ | |
$mapWidth = 1000; // change this value | |
$mapHeight = 1000; // change this value | |
$pi = pi(); | |
// get x value | |
$c['x'] = ($lng+180)*($mapWidth/360); | |
// convert from degrees to radians | |
$latRad = $lat*$pi/180; |