Skip to content

Instantly share code, notes, and snippets.

@c0debreaker
c0debreaker / nginx.conf
Created September 22, 2016 04:06 — forked from mtigas/nginx.conf
Nginx configuration for securedrop.propublica.org. (Based on Ubuntu 13.10 / Nginx 1.4.1 default config.)
# This configuration file is provided on an "as is" basis,
# with no warranties or representations, and any use of it
# is at the user's own risk.
#
# You will need to edit domain name information, IP addresses for
# redirection (at the bottom), SSL certificate and key paths, and
# the "Public-Key-Pins" header. Search for any instance of "TODO".
user www-data;
worker_processes 4;
@amysimmons
amysimmons / js-tricky-bits.md
Last active October 30, 2024 11:38
Understanding closures, callbacks and promises in JavaScript

#Understanding closures, callbacks and promises

For a code newbie like myself, callbacks, closures and promises are scary JavaScript concepts.

10 months into my full-time dev career, and I would struggle to explain these words to a peer.

So I decided it was time to face my fears, and try to get my head around each concept.

Here are the notes from my initial reading. I'll continue to refine them as my understanding improves.

@jaawerth
jaawerth / compose.es6.js
Last active October 17, 2020 08:08
ES5 and ES6 implementations of compose - readable implementation, not optimized
function compose(...fnArgs) {
const [first, ...funcs] = fnArgs.reverse();
return function(...args) {
return funcs.reduce((res, fn) => fn(res), first(...args));
};
}
@frederickfogerty
frederickfogerty / server.js
Created November 17, 2015 21:52
HTML5 History API with webpack-dev-middleware
const _ = require('lodash')
const path = require('path')
const express = require('express')
const webpack = require('webpack')
const config = require('./webpack.dev.config')
const app = express()
const compiler = webpack(config)
var devMiddleware = require('webpack-dev-middleware')(compiler, {
@abhisekp
abhisekp / # FCC Solutions.md
Last active February 1, 2023 10:43
Solutions to FreeCodeCamp Challenges - http://j.mp/abhisekpFCCSolns
@sebmarkbage
sebmarkbage / react-terminology.md
Last active January 11, 2026 02:45
React (Virtual) DOM Terminology
@mtigas
mtigas / nginx.conf
Last active March 20, 2025 14:14
Nginx configuration for securedrop.propublica.org. (Based on Ubuntu 13.10 / Nginx 1.4.1 default config.)
# This configuration file is provided on an "as is" basis,
# with no warranties or representations, and any use of it
# is at the user's own risk.
#
# You will need to edit domain name information, IP addresses for
# redirection (at the bottom), SSL certificate and key paths, and
# the "Public-Key-Pins" header. Search for any instance of "TODO".
user www-data;
worker_processes 4;