quick-n-dirty HTML markup generator
var dom = require('./domino');
dom.ul.li.span.class('note')
/* | |
Copy this into the console of any web page that is interactive and doesn't | |
do hard reloads. You will hear your DOM changes as different pitches of | |
audio. | |
I have found this interesting for debugging, but also fun to hear web pages | |
render like UIs do in movies. | |
*/ | |
const audioCtx = new (window.AudioContext || window.webkitAudioContext)() |
// Superconstructor | |
function Person(name) { | |
this.name = name; | |
} | |
Person.prototype.sayHelloTo = function (otherName) { | |
console.log(this.name + ' says hello to ' + otherName); | |
}; | |
Person.prototype.describe = function () { | |
return 'Person name ' + this.name; | |
}; |
import random | |
notas = ['C', 'D', 'E', 'F', 'G', 'A', 'B'] | |
while True: | |
nota = random.randint(0, len(notas) - 1) | |
if nota == (len(notas) - 1): | |
nota = 0 |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
var b; | |
if (!(b = t)) { | |
var w = Math, | |
y = {}, B = y.p = {}, aa = function () {}, C = B.A = { | |
extend: function (a) { | |
aa.prototype = this; | |
var c = new aa; | |
a && c.u(a); | |
c.z = this; | |
return c |
<?php | |
if (!function_exists('http_build_url')) | |
{ | |
define('HTTP_URL_REPLACE', 1); // Replace every part of the first URL when there's one of the second URL | |
define('HTTP_URL_JOIN_PATH', 2); // Join relative paths | |
define('HTTP_URL_JOIN_QUERY', 4); // Join query strings | |
define('HTTP_URL_STRIP_USER', 8); // Strip any user authentication information | |
define('HTTP_URL_STRIP_PASS', 16); // Strip any password authentication information | |
define('HTTP_URL_STRIP_AUTH', 32); // Strip any authentication information | |
define('HTTP_URL_STRIP_PORT', 64); // Strip explicit port numbers |