Skip to content

Instantly share code, notes, and snippets.

View mihaip's full-sized avatar

Mihai Parparita mihaip

View GitHub Profile
<html>
<body>
<table>
<tr>
<td style="background-color: rgb(233, 235, 238);">one</td>
<td style="background-color: rgb(233, 235, 238);"></td>
</tr>
</table>
</body>
</html>
@mihaip
mihaip / gist:8727429
Created January 31, 2014 06:23
Dictionary search for two-letter Gmail system labels
// Paste into Chrome's DevTools and run step() repeatedly
var count = 0;
function step() {
var c1 = String.fromCharCode(97 + Math.floor(count/26));
var c2 = String.fromCharCode(97 + count % 26);
location.hash = "#search/label:^" + c1 + c2 + "+is:anywhere";
count++;
}
@mihaip
mihaip / numbers.py
Created January 2, 2014 06:33
List all (12416) expressions that can be writen while using up all of the pieces in Max's number foam pad (digits 0 to 9, plus, minus and equal signs)
_DIGITS = frozenset(xrange(0, 10))
def generate(sequence, available_digits):
if not available_digits:
yield sequence
for digit in available_digits:
for s in generate(sequence + [digit], available_digits - set((digit, ))):
yield s
def eval(digits):
@mihaip
mihaip / gist:5209291
Created March 20, 2013 22:52
JS Scoping
for (var i = 0; i < ..; i++) {
var thing;
for (var j = 0; j < ...; j++) {
if (...) {
thing = ...;
break;
}
}
if (thing) {
@mihaip
mihaip / crash
Created February 3, 2011 21:57
Failure when running run-webkit-tests fast/events/recorded-keydown-event.html fast/events/tabindex-focus-blur-all.html
FlateDecode: decoding error: incorrect data check.
ASSERTION FAILED: m_rootObject->isValid()
(/Users/mihaip/Developer/source/chromium1/src/third_party/WebKit/Source/WebCore/bridge/jsc/BridgeJSC.cpp:109 void JSC::Bindings::Instance::willDestroyRuntimeObject(JSC::Bindings::RuntimeObject*))
-> JSC::Bindings::Instance::willDestroyRuntimeObject(JSC::Bindings::RuntimeObject*)
-> JSC::Bindings::RuntimeObject::~RuntimeObject()
-> WebKit::ProxyRuntimeObject::~ProxyRuntimeObject()
-> JSC::MarkedSpace::allocate(unsigned long)
-> JSC::Heap::allocate(unsigned long)
-> JSC::JSCell::operator new(unsigned long, JSC::ExecState*)
-> JSC::BooleanPrototype::BooleanPrototype(JSC::ExecState*, JSC::JSGlobalObject*, WTF::NonNullPassRefPtr<JSC::Structure>, JSC::Structure*)