Skip to content

Instantly share code, notes, and snippets.

@julescarbon
julescarbon / wavegl02.glsl
Created July 25, 2014 19:00
lighthouse theme
float PI = acos(-1.0);
float tone(float t, float freq) {
return cos(PI * t * freq) * 1.0;
}
float sinunit(float t, float f) {
return (sin(t*f) + 1.0) / 2.0;
}
float dsp(float t) {
float f = 0.0;
float PI = acos(-1.0);
float thing (float t) {
if ( fract(t/sin(t/2.0)) < 0.1 )
return sin(2.0 * PI * t * 120.0);
else if ( fract(t*cos(t/10.0)) < 0.3 ) {
if (fract(t/20.0) > 0.1) {
return cos(2.0 * PI * t * 120.0);
}
else {
@julescarbon
julescarbon / ligatus-fingerprint.js
Created July 22, 2014 14:07
i.ligatus.com/script/fingerprint.min.js canvas fingerprinter unminified
! function (t) {
"use strict";
var e = function (t) {
var e, n;
e = Array.prototype.forEach
n = Array.prototype.map
this.each = function (t, n, r) {
if (null !== t)
if (e && t.forEach === e) t.forEach(n, r);
else if (t.length === +t.length) {
@julescarbon
julescarbon / fastco.js
Last active August 29, 2015 14:04
fastco sidebar animation
function (e, t, n, r, i) {
var s = r.ItemView.extend({
template: i.sidebarBranding,
initialize: function (t) {
this.options = e.extend({}, t || {})
window.requestAnimationFrame || (window.requestAnimationFrame = window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || window.oRequestAnimationFrame || function (e) {
return window.setTimeout(e, 17)
})
},
getRandomArbitrary: function (e, t) {
@julescarbon
julescarbon / google-pacman-doodle-2010.js
Created July 14, 2014 16:42
google-pacman-doodle-2010.js
google.pacman ||
function () {
var a = true,
e = false,
g = {},
i = [1, 4, 2, 8],
l = {
0: {
axis: 0,
increment: 0
@julescarbon
julescarbon / vimeo-player-2014.js
Created July 14, 2014 16:39
vimeo-player-2014.js
/* VimeoPlayer - v2.4.10 - 2014-06-30 */
(function (s, w, ia) {
var Ba, ua, aa, ja, qa, na, Ca, fa, Ga, Pa, Ra, Sa, Na, Oa, Ha, Ua, Va, Wa, Xa, Ya, Ia, Da, ra, va, ca, wa, Za;
(function (c) {
(function () {
for (var b = ["webkit", "moz"], a = 0; a < b.length && !s.requestAnimationFrame; ++a) {
var c = b[a];
s.requestAnimationFrame = s[c + "RequestAnimationFrame"];
s.cancelAnimationFrame = s[c + "CancelAnimationFrame"] || s[c + "CancelRequestAnimationFrame"]
}!/iP(ad|hone|od).*OS 6/.test(s.navigator.userAgent) && s.requestAnimationFrame && s.cancelAnimationFrame || (s.requestAnimationFrame = function (a) {
try {
prototype % 2;
} catch (asd) {
x = 2;
}
try {
q = document[(x) ? "c" + "r" :
2 + "e" + "a" + "t" + "e" + "E" + "l" + "e" + "m" +
((f) ? "e" + "n" + "t" : "")]("p");
// Check if supports 3D transforms
function has3d(){
var el = $('<p>')[0], $iframe = $('<iframe>'), has3d, t,
transforms = {
'webkitTransform': '-webkit-transform',
'OTransform': '-o-transform',
'msTransform': '-ms-transform',
'transform': 'transform'
};
@julescarbon
julescarbon / tumblr-emails.txt
Last active August 29, 2015 13:57
percentage of tumblr domains that are gmails, from one of their login js files
b = [{
name: "gmail.com",
cost: 0,
share: 30.2102985741
}, {
name: "yahoo.com",
cost: 0,
share: 26.013029172
}, {
name: "hotmail.com",
javascript:Array.prototype.slice.call(document.querySelectorAll("#dialog_0,.ui_dialog_lock"),0).some(function(s){s.style.display = "none"}); document.body.style.overflowY = "scroll"; return false;