Skip to content

Instantly share code, notes, and snippets.

View otse's full-sized avatar
💾
I'm floppy

Okay otse

💾
I'm floppy
  • Netherlands
View GitHub Profile
@mudge
mudge / eventemitter.js
Last active July 2, 2024 13:06
A very simple EventEmitter in pure JavaScript (suitable for both node.js and browsers).
/* Polyfill indexOf. */
var indexOf;
if (typeof Array.prototype.indexOf === 'function') {
indexOf = function (haystack, needle) {
return haystack.indexOf(needle);
};
} else {
indexOf = function (haystack, needle) {
var i = 0, length = haystack.length, idx = -1, found = false;
@zorbash
zorbash / scanlines.css
Created November 7, 2012 16:05
scanlines background
.scanlines {
background-image: linear-gradient(90deg,
#223 25%, #450 25%, #410 50%,
#230 50%, #210 75%, #200 75%, #190);
background-size:6px 6px;
}