Skip to content

Instantly share code, notes, and snippets.

@plugn
plugn / inherits.js
Created January 23, 2013 12:50 — forked from kof/inherits.js
/**
* Inherit prototype properties
* @param {Function} ctor
* @param {Function} superCtor
*/
_.mixin({
inherits: (function(){
function noop(){}
function ecma3(ctor, superCtor) {
@plugn
plugn / buster.js
Created January 25, 2013 12:00 — forked from cjohansen/buster.js
var config = exports; // Vanity
config["Browser tests"] = {
environment: "browser",
sources: ["strftime.js"],
tests: ["strftime-test.js"]
};
config["Server tests"] = {
extends: "Browser tests",
var uriString = "https://addons.mozilla.org/firefox/downloads/latest/413716/addon-413716-latest.xpi";
var referer = "https://addons.mozilla.org/";
var private = false; // Отсылать запрос в приватном режиме
var ios = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService);
var uri = ios.newURI(uriString, null, null);
var scheme = uri.scheme && uri.scheme.toLowerCase();
var channel = scheme == "about" && "nsIAboutModule" in Components.interfaces
/**
* class.js
* @author Dmitry A. Soshnikov
*/
function Class(params) {
/**
* Constructor function
* If not specified, use default
@plugn
plugn / gist:6122051
Created July 31, 2013 13:37
Hello, Mizulina!
GET http://host.tld/path HTTP/1.1
Accept-Language: ru-RU, ru-obscene
Host: host.tld
/*
* object.watch polyfill
*
* 2012-04-03
*
* By Eli Grey, http://eligrey.com
* Public Domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
*/
<!doctype html>
<html>
<head>
<title>grid row with select</title>
<style type="text/css">
.content {
padding: 10px 20px 15px 20px;
}
/**
* class.js
* @author Dmitry A. Soshnikov
*/
function Class(params) {
/**
* Constructor function
* If not specified, use default
// See comments below.
// This code sample and justification brought to you by
// Isaac Z. Schlueter, aka isaacs
// standard style
var a = "ape",
b = "bat",
c = "cat",
d = "dog",