Skip to content

Instantly share code, notes, and snippets.

View mgol's full-sized avatar

Michał Gołębiowski-Owczarek mgol

View GitHub Profile
@mgol
mgol / git-fixed.sh
Last active April 25, 2017 10:27
Show the sorted list of tickets fixed between 2 given commits.
#!/bin/sh
# Show the sorted list of tickets fixed between 2 given commits.
if [ $# -ne 2 ]; then
echo "USAGE: `basename $0` commit1id commit2id"
exit 1
fi
git log --ancestry-path $1..$2 | egrep -i 'fix|fixes|fixed' | grep '#' | cut -f2 -d'#' | awk '{ printf "%d\n", $1 }' | sort
hooks.method = function() {
if (supportTestPasses()) {
delete hooks.method;
return;
}
hooks.method = function () {
// current hook code here
}
return hooks.method();
};
@mathiasbynens
mathiasbynens / opera-15-regressions.md
Last active September 23, 2023 14:50
List of things that broke with the Opera 15 release due to the switch to Blink/Chromium (Web features, not UI-specific stuff)
@rwaldron
rwaldron / timer.js
Created May 24, 2013 20:06
Something more scalable and organized then tacking junk onto the global object.
[[Global]].Timer = {};
Timer.Frame = function(handler) {
// ... does what rAF(handler) would do
};
Timer.Frame.prototype.cancel = function() {
// kills this Timer.Frame instance
};
@NV
NV / Readme.md
Last active May 17, 2024 03:38
Prepend the debugger statement to a function as easy as stopBefore('Element.prototype.removeChild'). Works in Chrome DevTools and Safari Inspector, doesn’t work in Firebug‘s and Firefox Developer Tools‘ console (I don’t know why). Works as a standalone script everywhere.

stopBefore.js

2min screencast

Examples

stopBefore(document, 'getElementById')
stopBefore('document.getElementById') // the same as the previous
stopBefore(Element.prototype, 'removeChild')