Skip to content

Instantly share code, notes, and snippets.

View cilindrox's full-sized avatar
💭
:suspect:

Gaston Festari cilindrox

💭
:suspect:
View GitHub Profile
@wycats
wycats / HTMLBars Plan.md
Last active December 18, 2015 15:59
HTMLBars Binding

HTMLBars serves as a polyfill for a native implement of node.bind.

Instead of letting the browser parse the HTML and generate nodes, which leaves us at the mercy of the limitations of the parser, HTMLBars implements an HTML parser and generates the nodes itself.

As HTMLBars generates the nodes, it calls into node.bind if it detects mustache syntax.

Open questions:

  • MDV "syntaxes"
@jbenet
jbenet / simple-git-branching-model.md
Last active May 3, 2025 18:07
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@plentz
plentz / nginx.conf
Last active May 3, 2025 05:27
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@markselby
markselby / node-express-redis-cache.js
Created October 28, 2013 02:19
Add Redis request caching to Node.js with Express.js.
var zlib = require('zlib');
var redis = require('redis');
var redisClient = redis.createClient();
var crypto = require('crypto');
// Our custom caching write function
function cached(body, lifetime, type) {
var key = this.req.originalUrl;
var res = this;
var etag, len;
@arobson
arobson / abstractions.md
Last active October 14, 2021 06:46
Rabbit.MQ + Node.js Notes

Abstraction Suggestions

Summary: use good/established messaging patterns like Enterprise Integration Patterns. Don't make up your own. Don't expose transport implementation details to your application.

Broker

As much as possible, I prefer to hide Rabbit's implementation details from my application. In .Net we have a Broker abstraction that can communicate through a lot of different transports (rabbit just happens to be our preferred one). The broker allows us to expose a very simple API which is basically:

  • publish
  • request
  • start/stop subscription
@sd
sd / styles.less
Last active August 29, 2015 13:56
My @atomeditor styles.less
/* I prefer a more compact tree-view */
.tree-view {
font-size: 11px;
.list-item {
line-height: 18px !important;
}
.selected:before, .selected:before {
height: 18px !important;
#echo -ne "\x1bP\x1b]4;0;rgb:00/00/00\a\x1b\\"
#echo -ne "\x1bP\x1b]4;1;rgb:7a/00/00\a\x1b\\"
#echo -ne "\x1bP\x1b]4;2;rgb:00/7a/00\a\x1b\\"
#echo -ne "\x1bP\x1b]4;3;rgb:7a/7a/00\a\x1b\\"
#echo -ne "\x1bP\x1b]4;4;rgb:00/00/7a\a\x1b\\"
#echo -ne "\x1bP\x1b]4;5;rgb:7a/00/7a\a\x1b\\"
#echo -ne "\x1bP\x1b]4;6;rgb:00/7a/7a\a\x1b\\"
#echo -ne "\x1bP\x1b]4;7;rgb:c5/c5/c5\a\x1b\\"
#echo -ne "\x1bP\x1b]4;8;rgb:7a/7a/7a\a\x1b\\"
#echo -ne "\x1bP\x1b]4;9;rgb:ff/00/00\a\x1b\\"
@dedy-purwanto
dedy-purwanto / gist:11312110
Created April 26, 2014 05:00
Bulk remove iTerm2 color schemes.
# There was a day where I have too many color schemes in iTerm2 and I want to remove them all.
# iTerm2 doesn't have "bulk remove" and it was literally painful to delete them one-by-one.
# iTerm2 save it's preference in ~/Library/Preferences/com.googlecode.iterm2.plist in a binary format
# What you need to do is basically copy that somewhere, convert to xml and remove color schemes in the xml files.
$ cd /tmp/
$ cp ~/Library/Preferences/com.googlecode.iterm2.plist .
$ plutil -convert xml1 com.googlecode.iterm2.plist
$ vi com.googlecode.iterm2.plist
@staltz
staltz / introrx.md
Last active May 15, 2025 10:37
The introduction to Reactive Programming you've been missing