Skip to content

Instantly share code, notes, and snippets.

@jeffrafter
jeffrafter / handler.js
Created April 2, 2010 20:59
Simple HTTP Server and Router in node.js
exports.createHandler = function (method) {
return new Handler(method);
}
Handler = function(method) {
this.process = function(req, res) {
params = null;
return method.apply(this, [req, res, params]);
}
}
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Created: 2010/12/05
// Updated: 2018/09/12
// License: MIT
//
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it)
//
@staltz
staltz / introrx.md
Last active July 22, 2024 09:31
The introduction to Reactive Programming you've been missing
@paulallies
paulallies / gist:0052fab554b14bbfa3ef
Last active November 12, 2023 23:00
Remove node_modules from git repo
#add 'node_modules' to .gitignore file
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin <branch-name>
@vasanthk
vasanthk / System Design.md
Last active July 23, 2024 11:24
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@thiamsantos
thiamsantos / links.js
Created February 21, 2017 00:14
Social Media Sharing URLS
@thiamsantos
thiamsantos / CONTRIBUTING.md
Created March 12, 2017 00:52
Example of a contributing file

Contributing to project-name

First off, thanks for taking the time to contribute!

Now, take a moment to be sure your contributions make sense to everyone else. These are just guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.

Reporting Issues

Found a problem? Want a new feature? First of all see if your issue or idea has already been reported. If don't, just open a new clear and descriptive issue.

@thiamsantos
thiamsantos / emoji-commit.md
Last active March 15, 2017 18:03
Commit Message Emoji

Commit Message Emoji

Every commit is important. So let's celebrate each and every commit with a corresponding emoji! 😄

Which Emoji to Use? 😕

Commit Type Emoji
Initial Commit 🎉 :tada:
@thiamsantos
thiamsantos / .editorconfig
Last active March 1, 2018 12:50
editorconfig
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true