Skip to content

Instantly share code, notes, and snippets.

View techiev2's full-sized avatar
🥷

Sriram Velamur techiev2

🥷
View GitHub Profile
@shkm
shkm / conosle.js
Created May 22, 2013 13:17
Brings conosle to Chrome. See http://youtu.be/MVw8N3hTfCI
conosle = console;
@getify
getify / gist:5568643
Created May 13, 2013 14:20
interesting gotcha with `[[Prototype]]` and owned vs delegated properties
function Parent(){}
Parent.prototype.something = 42;
var p = new Parent();
p.hasOwnProperty("something"); // false
p.something--; // apparently the same as `p.something = p.something - 1`
p.hasOwnProperty("something"); // true!!
@getify
getify / gist:5226305
Last active January 7, 2024 11:59
playing around with an `Object.make()` helper
// `Object.make(..)` is a helper/wrapper for `Object.create(..)`. Both create a new
// object, and optionally link that new object's `[[Prototype]]` chain to another object.
//
// But `Object.make(..)` makes sure the new object always has a `__proto__` property
// (even a null one) and delegation to a `isPrototypeOf(..)` method, both of which are
// missing from the bare object (aka "Dictionary") created by `Object.create(null)`.
//
// `isPrototypeOf()` is put on a extra object that your created object can delegate to,
// if any only if you create an empty object (by not passing a `linkTo`) that otherwise
// wouldn't have access to `isPrototypeOf()`.
@detro
detro / raising_issues.uml
Created March 22, 2013 19:08
How to raise issues against an Open Source project (my take on it)
/'
Render this file with PlantUML.
Official website: http://plantuml.sourceforge.net/
'/
@startuml
start
:You found and <b>Issue</b>;
@nizz
nizz / application.py
Last active July 30, 2018 04:47
Answer for http://stackoverflow.com/questions/14441081/how-to-generate-web-api-docs-from-python-docstrings/ Replace application.py on sphinx path with the one below (the path on my system is /Library/Frameworks/Python.framework/Versions/Current/lib/python2.7/site-packages/Sphinx-1.1.3-py2.7.egg/sphinx/) Add simpleautodoc.py on the ext folder Add…
# -*- coding: utf-8 -*-
"""
sphinx.application
~~~~~~~~~~~~~~~~~~
Sphinx application object.
Gracefully adapted from the TextPress system by Armin.
:copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS.
@nathansmith
nathansmith / html_reset.css
Created January 28, 2010 00:02
Reset for HTML4 / HTML5
/* `XHTML, HTML4, HTML5 Reset
----------------------------------------------------------------------------------------------------*/
a,
abbr,
acronym,
address,
applet,
article,
aside,