Skip to content

Instantly share code, notes, and snippets.

View kolinw's full-sized avatar

Kolin Weidmann kolinw

View GitHub Profile
@paulirish
paulirish / bling.js
Last active May 1, 2024 19:56
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@dmnsgn
dmnsgn / WebGL-WebGPU-frameworks-libraries.md
Last active May 1, 2024 18:18
A collection of WebGL and WebGPU frameworks and libraries

A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.

Engines and libraries ⚙️

Name Stars Last Commit Description
three.js ![GitHub
@gre
gre / easing.js
Last active April 30, 2024 04:58
Simple Easing Functions in Javascript - see https://github.com/gre/bezier-easing
/*
* This work is free. You can redistribute it and/or modify it under the
* terms of the Do What The Fuck You Want To Public License, Version 2,
* as published by Sam Hocevar. See the COPYING file for more details.
*/
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
@ayamflow
ayamflow / gist:b602ab436ac9f05660d9c15190f4fd7b
Created May 9, 2016 19:10
Safari border-radius + overflow: hidden + CSS transform fix
// Add on element with overflow
-webkit-mask-image: -webkit-radial-gradient(white, black);
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}
@spyesx
spyesx / adblock-blacklist.css
Last active February 7, 2024 09:48
Class and ID to avoid because of AdBlock
.sidebar_newsletter_sign_up,
.sidebar_subscribe,
.sign-up-form-single,
.signup-form--header,
.signup-with-checkboxes,
.skinny-sign-up,
.slidedown-newsletter,
.small-newsletter,
.social-link-mail,
.social_newsletter_box,
@Danetag
Danetag / Sprite.js
Last active October 14, 2023 16:29
Simple class to play a PNG sequence into a canvas
// Here is a simple class that contains loading methods.
// Nothing fancy, but the idea is simply to return a Promise
import { loadImg } from './load';
class Sprite {
/*
@Example
import Sprite from './Sprite';
@yckart
yckart / README.md
Last active May 19, 2023 06:37
Checks if an element is inside another or if it collides with another. - http://stackoverflow.com/a/19614185/1250044

Usage:

var player = new Rect(0, 0, 100, 100);
var target = new Rect(50, 50, 100, 100);
player.is = new AABB(player);

player.is.inside(target);
player.is.colliding(target);
player.is.containing(target);
@csswizardry
csswizardry / BEM-inuit.css.md
Created October 2, 2012 20:09
Thoughts on BEM for inuit.css

Bringing BEM to inuit.css

BEM is a methodology for naming and classifying CSS selectors in a way to make them a lot more strict, transparent and informative.

The naming convention follows this pattern:

.block{}
.block__element{}
.block--modifier{}
@chrisdickinson
chrisdickinson / smooth_sortable_animating.html
Created January 29, 2011 05:39
smoothly animate jquery sortable lists.
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<style>
ul { float:left; margin-right:20px; }
body { color:white; font-family:Helvetica, sans-serif; text-shadow:1px 1px 1px rgba(0,0,0,0.2); }
ul { width:512px; overflow:hidden; border-radius:6px; }