http://www.perkin.org.uk/posts/automated-virtualbox-smartos-installs.html
save the following as setup.sh and run it:
#!/bin/sh
#
# Configurables:
| set nocompatible | |
| filetype off " required! | |
| set rtp+=~/.vim/vundle.git/ | |
| call vundle#rc() | |
| " My Bundles here: | |
| " | |
| " original repos on github | |
| Bundle 'tpope/vim-fugitive' |
| ~/.xprofile | |
| xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync | |
| xrandr --addmode Virtual1 1920x1080_60.00 | |
| xrandr --output Virtual1 --mode 1920x1080_60.00 |
| export PATH="$HOME/bin:$PATH" | |
| ##### NPM STUFF | |
| # Checks that the child directory is a subdirectory of the parent | |
| is_subdirectory() { | |
| local child="$1" | |
| local parent="$2" | |
| if [[ "${child##${parent}}" != "$child" ]]; then | |
| return 0 |
http://www.perkin.org.uk/posts/automated-virtualbox-smartos-installs.html
save the following as setup.sh and run it:
#!/bin/sh
#
# Configurables:
| var ChildProcess = require('child_process'); | |
| setInterval(function () { | |
| ChildProcess.exec('echo', function () { | |
| console.log(Math.round(process.memoryUsage().rss / (1024 * 1024)) + 'M used'); | |
| }); | |
| }, 100); |
| var ChildProcess = require('child_process'); | |
| var maxMem = Math.round(process.memoryUsage().rss / (1024 * 1024)) * 2; | |
| console.time('leak'); | |
| setInterval(function () { | |
| ChildProcess.exec('echo', function () { | |
| var mem = Math.round(process.memoryUsage().rss / (1024 * 1024)); |
| var Http = require('http'); | |
| Http.createServer(function (req, res) { | |
| res.writeHead(200, {'Content-Type': 'text/plain'}); | |
| res.end('Hello World\n'); | |
| Http.request({ host: 'localhost', port: 9000}).end(); | |
| }).listen(8000); |
| // Middle tier (similulates inbound and outbound traffic) | |
| // Load modules | |
| var Http = require('http'); | |
| setInterval(function () { | |
| Http.request({ port: 9000 }).end(); | |
| }, 0); |
| var Http = require('http'); | |
| setInterval(function () { | |
| Http.get('http://localhost:9000/', function(res) { | |
| console.log("Got response: " + res.statusCode); | |
| }).on('error', function(e) { | |
| console.log("Got error: " + e.message); | |
| }); | |
| }, 5); |
| var ChildProcess = require('child_process'); | |
| var maxMem = Math.round(process.memoryUsage().rss / (1024 * 1024)) * 2; | |
| setInterval(function () { | |
| ChildProcess.exec('echo', function () { | |
| var mem = Math.round(process.memoryUsage().rss / (1024 * 1024)); | |
| console.log(mem + 'M used'); |