Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
########################################################### | |
# Homebrew | |
# Fish Shell | |
# Fisherman | |
# Powerline Fonts | |
# iTerm2 | |
curl https://raw.githubusercontent.com/ellerbrock/fish-shell-setup-osx/master/install.sh | bash |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
# file /etc/sudoers.d/go | |
# preferably edit using visudo -f <file> | |
# allow the go user to run some commands using sudo. Need to specify full path to command. | |
Cmnd_Alias GO_SUDO_CMDS = /usr/sbin/vzctl, /bin/umount /mnt/vzdata/*/projectdata | |
# don't require a tty for running sudo | |
Defaults!GO_SUDO_CMDS !requiretty | |
# don't require password |
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
File locations:
nginx.conf
to /usr/local/etc/nginx/
default
and default-ssl
to /usr/local/etc/nginx/sites-available
homebrew.mxcl.nginx.plist
to /Library/LaunchDaemons/
// node.js proxy server example for adding CORS headers to any existing http services. | |
// yes, i know this is super basic, that's why it's here. use this to help understand how http-proxy works with express if you need future routing capabilities | |
var httpProxy = require('http-proxy'), | |
express = require('express'); | |
var proxy = new httpProxy.RoutingProxy(); | |
var proxyOptions = { | |
host: '192.168.3.11', |
# Sample implementation of quicksort and mergesort in ruby | |
# Both algorithm sort in O(n * lg(n)) time | |
# Quicksort works inplace, where mergesort works in a new array | |
def quicksort(array, from=0, to=nil) | |
if to == nil | |
# Sort the whole array, by default | |
to = array.count - 1 | |
end |
description "Upstart script to run a nodejs app as a service" | |
author "Louis Chatriot" | |
env NODE_BIN=/usr/local/bin/node | |
env APP_DIR=/path/to/app/dir | |
env SCRIPT_FILE="scriptfile.js" # Entry point for the nodejs app | |
env LOG_FILE=/path/to/logfile.log | |
env RUN_AS="anyuser" # Upstart can only be run nicely as root, need to drop privileges | |
env SERVER_ENV="anything" # Usual apps can be run in different environments (development, test, production ...) | |
# I typically use the environment variable NODE_ENV (see below) |
(function() { | |
/* == GLOBAL DECLERATIONS == */ | |
TouchMouseEvent = { | |
DOWN: "touchmousedown", | |
UP: "touchmouseup", | |
MOVE: "touchmousemove" | |
} | |
/* == EVENT LISTENERS == */ |