Skip to content

Instantly share code, notes, and snippets.


Piotrek Koszuliński Reinmar

View GitHub Profile
hofmannsven /
Created Dec 6, 2017
Increase key repeat rate on macOS

Increase key repeat rate on macOS

Settings: System Preferences » Keyboard » Key Repeat/Delay Until Repeat

Use the commands below to increase the key repeat rate on macOS beyond the possible settings via the user interface. The changes aren't applied until you restart your computer.


zbraniecki / cachedIterable.js
Last active Mar 16, 2017
[JS] Iterable that can be replayed and caches resolved results
View cachedIterable.js
function cachedIterable(iterable) {
const cache = [];
return {
[Symbol.iterator]() {
return {
ptr: 0,
next() {
if (cache.length <= this.ptr) {
robertknight /
Last active Feb 8, 2021
Minimal Webpack DllPlugin example

Compile with:

webpack --config vendor.webpack.config.js
webpack --config app.webpack.config.js

Use with the following index.html

mackuba /
Last active Dec 17, 2015
Notes from the Hive53 meetup with Joel Spolsky (14.05.2013)

(This is mostly based on this post from 2000.)

There are two types of startups you can create. You have to know from the start which one it’s going to be. If you can't decide, or start using the rules from the wrong kind of startup, you’ll probably lose.

Type 1: Get Big Fast startup

  • Stack Overflow, Facebook, Yelp, Amazon, Trello
  • has to grow quickly
  • concentrates on getting as many users as possible in order to earn money in the future in some way
  • relies on VC money
jed /
Created Oct 19, 2012
Rendering templates obsolete

(tl;dr DOM builders like [domo][domo] trump HTML templates on the client.)

Like all web developers, I've used a lot of template engines. Like most, I've also written a few of them, some of which even [fit in a tweet][140].

The first open-source code I ever wrote was also one of the the first template engines for node.js, [a port][node-tmpl] of the mother of all JavaScript template engines, [John Resig][jresig]'s [micro-templates][tmpl]. Of course, these days you can't swing a dead cat without hitting a template engine; one in eight packages on npm ([2,220][npm templates] of 16,226 as of 10/19) involve templates.

John's implementation has since evolved and [lives on in Underscore.js][underscore], which means it's the default choice for templating in Backbone.js. And for a while, it's all I would ever use when building a client-side app.

But I can't really see the value in client-side HTML templates anymore.

sgergely / gist:3793166
Created Sep 27, 2012
Midnight Commander Keyboard Shortcuts for Mac OSX
View gist:3793166
----- Esc -----
Quick change directory: Esc + c
Quick change directory history: Esc + c and then Esc + h
Quick change directory previous entry: Esc + c and then Esc + p
Command line history: Esc + h
Command line previous command: Esc + p
View change: Esc + t (each time you do this shortcut a new directory view will appear)
Print current working directory in command line: Esc + a
Switch between background command line and MC: Ctrl + o
Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name
garryyao / git-pull-force
Created Mar 12, 2012
Git commands for rebase diverged remote branche without a merge.
View git-pull-force
git checkout $BRANCH
git fetch origin
git merge-base $BRANCH origin/$BRANCH | xargs git reset --hard
git merge origin/$BRANCH --ff-only
abozhilov / gist:1333507
Created Nov 2, 2011
Arguments default value
View gist:1333507
function func(a, f) {
return function (args) {
args.__proto__ = a;, args);
var f = func({foo : 10, bar : 20}, function (args) {
View LICENSE.txt
Version 2, December 2004
Copyright (C) 2011 Andrew Petersen <>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.