(Full description and list of commands at - https://npmjs.org/doc/index.html)
Make sure to export your local $PATH and prepand relative ./node_modules/.bin/:
(Full description and list of commands at - https://npmjs.org/doc/index.html)
Make sure to export your local $PATH and prepand relative ./node_modules/.bin/:
| var express = require('express'), | |
| httpProxy = require('http-proxy'), | |
| app = express(); | |
| var proxy = new httpProxy.RoutingProxy(); | |
| function apiProxy(host, port) { | |
| return function(req, res, next) { | |
| if(req.url.match(new RegExp('^\/api\/'))) { | |
| proxy.proxyRequest(req, res, {host: host, port: port}); |
| Insert the following code into the *.VMX file: | |
| sched.mem.pshare.enable = "FALSE" | |
| mainMem.useNamedFile = "FALSE" | |
| prefvmx.minVmMemPct = "100" | |
| prefvmx.useRecommendedLockedMemSize = "TRUE" | |
| mainMem.partialLazySave = "FALSE" | |
| mainMem.partialLazyRestore = "FALSE" | |
| priority.grabbed = "high" | |
| priority.ungrabbed = "normal" |
These instructions work for the Raspberry Pi running Raspbian (hard float) and create a hardware optimized version of NodeJS for the Raspberry PI, (and include a working install and NPM!!!):
Install Raspbian - http://www.raspberrypi.org/downloads
Install the necessary dependecies:
sudo apt-get install git-core build-essential(If you just installed git then you need to administer your git identity first, else adding the patches below will fail!!!)
Welcome!
UPDATE: This list is no longer maintained. I've moved it to its own repo so you can send suggestions as Pull Requests. https://github.com/dideler/bootstrapping/
For feedback or suggestions, please send a tweet (@dideler). Gist comments don't notify me. Pull requests aren't possible with gists (yet), so I don't recommend forking because then I can't easily get the change.
Starring this gist will give me an idea of how many people consider this list useful.
| #!/bin/bash | |
| LINES=$(tput lines) | |
| COLUMNS=$(tput cols) | |
| declare -A snowflakes | |
| declare -A lastflakes | |
| clear |
| # Usage: | |
| # source iterm2.zsh | |
| # iTerm2 tab color commands | |
| # https://iterm2.com/documentation-escape-codes.html | |
| if [[ -n "$ITERM_SESSION_ID" ]]; then | |
| tab-color() { | |
| echo -ne "\033]6;1;bg;red;brightness;$1\a" | |
| echo -ne "\033]6;1;bg;green;brightness;$2\a" |
| /* | |
| * Coffetimer (safetytimer) | |
| * | |
| * Activated when button (pin 4) is grounded. | |
| * Connected to a RF - remote control on pin 5 and 6 | |
| * via a couple of transistors, controling the | |
| * coffemakers power outlet. | |
| * | |
| * */ |