Skip to content

Instantly share code, notes, and snippets.

🚀
Hello!

Piotrek Koszuliński Reinmar

🚀
Hello!
Block or report user

Report or block Reinmar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@hofmannsven
hofmannsven / README.md
Created Dec 6, 2017
Increase key repeat rate on macOS
View README.md

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 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) {
cache.push(iterable.next());
}
@robertknight
robertknight / Build.md
Last active May 28, 2019
Minimal Webpack DllPlugin example
View Build.md

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 Dec 17, 2015
Notes from the Hive53 meetup with Joel Spolsky (14.05.2013)
View hive_joel.md

(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 Oct 19, 2012
Rendering templates obsolete
View rendering_templates_obsolete.md

(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 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
garryyao / git-pull-force
Created Mar 12, 2012
Git commands for rebase diverged remote branche without a merge.
View git-pull-force
#!/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 Nov 2, 2011
Arguments default value
View gist:1333507
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);
View LICENSE.txt
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
You can’t perform that action at this time.