Skip to content

Instantly share code, notes, and snippets.

GerHobbelt /
Last active May 22, 2020 — forked from moyaldror/
Complete remove of git submoule
# Work repo:
# Sources:
if [ $# -ne 1 ]; then
moyaldror /
Last active Aug 3, 2021
Complete remove of git submoule
if [ $# -ne 1 ]; then
echo "Usage: $0 <submodule full name>"
exit 1
MODULE_NAME_FOR_SED=$(echo $MODULE_NAME | sed -e 's/\//\\\//g')
wyhasany /
Last active Dec 15, 2021
Wine configuration for QTranslate under Linux/MacOS

QTranslate for Linux

This is tutorial how to run awesome application to context translation: QTranslate The authors write on the site that they don't plan to support QTranslate for other platforms than Microsoft Windows. I felt a lack similiar solution at Linux. So I've tried to run that application at Linux Ubuntu distribution. On the end that's works I really appreciate all the help which I received at winehq forum.


chicoxyzzy / results
Created Jan 19, 2017
Benchmarking for loops
View results
Now using node v4.7.2 (npm v2.15.11)
// v8 (Node.js 4.7.2)
forVar_______: 2ms
forLet_______: 13ms
forOfVar_____: 66ms
forOfLetConst: 64ms
forEachVar___: 15ms
forEachLet___: 21ms

Test LargeStructTest

Running cold

   Serialize                      45 ms
   Deserialize                    40 ms
   Size                           32 bytes
 Total 85 ms
paulirish /
Last active Jun 30, 2022
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
View gist:4294d5c212a6d2254703

From Fabrice Bellard, with minor name change (umulh):

// return the high 32 bit part of the 64 bit addition of (hi0, lo0) and (hi1, lo1)
Math.iaddh(lo0, hi0, lo1, hi1)

// return the high 32 bit part of the 64 bit subtraction of (hi0, lo0) and (hi1, lo1)
Math.isubh(lo0, hi0, lo1, hi1)

// return the high 32 bit part of the signed 64 bit product of the 32 bit numbers a and b
mobilemind /
Last active Jun 21, 2022
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
enyo /
Created Jul 3, 2013
Print changelog to use for Github releases. (Goes through all commits, and shows the one with a #changelog hashtag)
#echo git log $1...$2 --pretty=format:'<li> <a href="<project>/commit/%H">view commit &bull;</a> %s</li> ' --reverse | grep "#changelog"
firstTag=$(git tag | tail -2 | head -1)
secondTag=$(git tag | tail -1)
cmd=$(basename $0)
if [ "$1" == "-h" ]