Skip to content

Instantly share code, notes, and snippets.

View Reinmar's full-sized avatar
🚀
Hello!

Piotrek Koszuliński Reinmar

🚀
Hello!
View GitHub Profile
@hofmannsven
hofmannsven / README.md
Created December 6, 2017 00:32
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.

Source: https://apple.stackexchange.com/a/83923

@zbraniecki
zbraniecki / cachedIterable.js
Last active March 16, 2017 19:14
[JS] Iterable that can be replayed and caches resolved results
function cachedIterable(iterable) {
const cache = [];
return {
[Symbol.iterator]() {
return {
ptr: 0,
next() {
if (cache.length <= this.ptr) {
cache.push(iterable.next());
}
@robertknight
robertknight / Build.md
Last active July 8, 2022 01:32
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
mackuba / hive_joel.md
Last active December 17, 2015 23:38
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
jed / rendering_templates_obsolete.md
Created October 19, 2012 05:07
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
sgergely / gist:3793166
Created September 27, 2012 09:43
Midnight Commander Keyboard Shortcuts for Mac OSX
----- 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
garryyao / git-pull-force
Created March 12, 2012 15:26
Git commands for rebase diverged remote branche without a merge.
#!/bin/sh
BRANCH=$1
git checkout $BRANCH
git fetch origin
git merge-base $BRANCH origin/$BRANCH | xargs git reset --hard
git merge origin/$BRANCH --ff-only
@abozhilov
abozhilov / gist:1333507
Created November 2, 2011 12:32
Arguments default value
function func(a, f) {
return function (args) {
args.__proto__ = a;
f.call(this, args);
};
};
var f = func({foo : 10, bar : 20}, function (args) {
print(args.foo, args.bar);
@kirbysayshi
kirbysayshi / LICENSE.txt
Created October 14, 2011 04:51 — forked from 140bytes/LICENSE.txt
Signals in JS
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Andrew Petersen <http://kirbysayshi.github.com>
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.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE