Skip to content

Instantly share code, notes, and snippets.

@paulserraino
paulserraino / bitwise-func
Last active August 29, 2015 14:16
bitwise anonymous functions
~~function (a) {
return a ^ function () { // 1 ^ 2
return a << 1 | function () { // 2 | 0
return a << 1 & function () { // 2 & 1
return a; // 1
}()
}()
}()
}(1)
// 3
//returns an array of methods
Object.prototype.methods = function () {
var m = [], k;
for (k in this)
if (typeof this[k] === "function") m.push(k);
return m;
};
Object.prototype.hasMethod = function (m) {
return m in this && typeof this[m] === "function";
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Violations</title>
<style>
body {
padding: 20px;
font-family: "helvetica neue", helvetica;
}

customizable css brower

Easily show case your work, just add a background-image to .content and change the url.

A Pen by Paul Serraino on CodePen.

License.