Skip to content

Instantly share code, notes, and snippets.

@jankuca
jankuca / examples.js
Created February 28, 2011 22:31
Advanced JavaScript (ECMAScript 5) Inheritance
var A = Function.inherit(function () {
console.log('construct A');
}, {
'aa': function () {
console.log('aa A');
},
});
var B = A.inherit(function () {
console.log('construct B');
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Created: 2010/12/05
// Updated: 2018/09/12
// License: MIT
//
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it)
//
@MicahElliott
MicahElliott / colortrans.py
Created November 29, 2010 07:57
Convert values between RGB hex codes and xterm-256 color codes.
#! /usr/bin/env python
""" Convert values between RGB hex codes and xterm-256 color codes.
Nice long listing of all 256 colors and their codes. Useful for
developing console color themes, or even script output schemes.
Resources:
* http://en.wikipedia.org/wiki/8-bit_color
* http://en.wikipedia.org/wiki/ANSI_escape_code