This file contains hidden or 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
var CLerp = | |
{ | |
time: 0, // Program / game elapsed time | |
lerps: [], | |
doLerp: function(v0, v1, t, f, id) | |
{ | |
var self = this; | |
var id = id || null; |
This file contains hidden or 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 timestamp() | |
{ | |
return window.performance && window.performance.now ? window.performance.now() : new Date().getTime(); | |
} | |
this.t = | |
{ | |
now: null, | |
acc: 0, |
This file contains hidden or 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
// Scans through whole HTML document and tries to find src or css url-rules that are faulty | |
// These faulty / empty rules can cause Google Chrome to load a webpage multiple times | |
// First run this whole script in developer console and then print out contents of bustedNullSrcs array | |
// The array contents give hints as to what might cause the Chrome multiple page load bug | |
var bustedNullSrcs = []; | |
(function($) | |
{ | |
bustedNullSrcs.length = 0; |
This file contains hidden or 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
/******************************************************************************* | |
* Script: PHP dependency sniffer | |
* Description: Figures out to which PHP scripts the page contacts during use | |
* Date: 15.10.2015 | |
* Comments | |
* It is not perfect, but at least gives some idea which PHP files some page uses | |
* | |
* Include this script on the page you want to sniff for PHP file usage and | |
* use the page normally, as in go through page's controls of which you think |
This file contains hidden or 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
<!doctype html> | |
<html> | |
<head> | |
<title>svgviewer</title> | |
<style> | |
* | |
{ | |
margin: 0; | |
padding: 0; |
This file contains hidden or 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
/* | |
* @title crx DL link | |
* @description prompt crx download-link on Chrome Web Store | |
* @include https://chrome.google.com/webstore/detail/* | |
* @contributor taizooo http://let.hatelabo.jp/taizooo/let/gYC-x-e5r_G0bw (Fork of) | |
* @contributor noromanba http://let.hatelabo.jp/noromanba/let/hLHX5-ST-aMn | |
* @license MIT License http://opensource.org/licenses/MIT | |
* @javascript_url | |
*/ |
This file contains hidden or 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
$(document).ajaxSend(function(event, request, settings) | |
{ | |
console.log('Caught AJAX request!'); | |
console.log(event); | |
console.log(request); | |
console.log(settings); | |
}); |
This file contains hidden or 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
$(document).on('keypress', function(e) | |
{ | |
// Evaluate keycode into a lowercase human-readable letter | |
var key = String.fromCharCode(e.charCode).toLowerCase(); | |
// Figure what to do with each key | |
switch(key) | |
{ | |
case 'a': | |
console.log('a pressed'); |
This file contains hidden or 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.position = Victor.fromObject( | |
{ | |
x: self.vpc.x + Math.cos(time * 0.002) * self.helpers.sineBetween(-100, 100, time * 0.0002), | |
y: self.vpc.y + Math.sin(time * 0.002) * self.helpers.sineBetween(100, 100, time * 0.002) | |
}); |
This file contains hidden or 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.position = Victor.fromObject( | |
{ | |
x: self.vpc.x + Math.cos(time * 0.002) * self.helpers.sineBetween(10, 250, time * 0.002), | |
y: self.vpc.y + Math.sin(time * 0.002) * self.helpers.sineBetween(-100, 250, time * 0.002) | |
}); |