(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
#!/bin/bash | |
# | |
# A small script that works like `cd` except that | |
# it keeps cd-ing until it reachs the project root | |
# project is defined by default as the directory | |
# that contains a .git sub-directory. | |
# | |
# Change this behavior like this: | |
# CDR_ROOT_ID=composer.json |
package main | |
import ( | |
"fmt" | |
"github.com/codegangsta/negroni" | |
"github.com/gorilla/mux" | |
"log" | |
"net/http" | |
) |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
I was tired of Chrome eating all my laptop resources so I decided to put some limit to it with cgroup.
As I was using Ubuntu 12.04 with support for cgroup, I installed the package cgroup-bin
and add the following group to the file /etc/cgconfig.conf
:
group browsers {
cpu {
# Set the relative share of CPU resources equal to 25%
cpu.shares = "256";
}
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');
Those suck for maintenance and they're ugly.
#! /bin/bash | |
# create base files for a bonfire module | |
u=$(tr '[a-z]' '[A-Z]' <<< ${1:0:1}) | |
className="${u}${1:1}" | |
mkdir $1 | |
mkdir "$1/assets" | |
mkdir "$1/config" |