This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# add this to your ~/.bashrc | |
# | |
# start dropbox | |
if [ "$(pidof dropbox)" ] | |
then | |
# dont start | |
echo "dropbox is running" | |
else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
# set a password, leave all else as default | |
echo "requirepass password" >> tests/auth_error.conf | |
# start redis server | |
redis-server tests/auth_error.conf | |
# run this script | |
node tests/auth_error.js | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Animal() { | |
this.legs = 4; | |
}; | |
function Dog() { | |
this.sound = 'woof'; | |
}; | |
Dog.prototype = new Animal(); | |
function Cat() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http') | |
, director = require('director') | |
, PORT = process.env.port || 8000 | |
var routes = { | |
'/hello': { | |
get: function(route) { this.res.end('/hello') } | |
} | |
} | |
var routerOptions = { notfound: notFound } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'); | |
var fs = require('fs'); | |
var ip = '127.0.0.1'; | |
var port = 2000; | |
var www = process.cwd(); | |
var mimetypes = {'html': 'text/html', 'js': 'text/javascript', 'css': 'text/css', 'png': 'image/png', 'svg': 'image/svg'}; | |
var path = require('path'); | |
http.createServer(function (req, res) { | |
fs.realpath(path.join(www, req.url), function(err, realpath){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl http://npmjs.org/install.sh | sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/Dropbox/dev/npmpants/slave/test(master)§ npm test nano | pbcopy | |
sh: ./node_modules/ensure/bin/tap.js: No such file or directory | |
npm ERR! [email protected] test: `./node_modules/ensure/bin/tap.js tests/*/*.js` | |
npm ERR! `sh "-c" "./node_modules/ensure/bin/tap.js tests/*/*.js"` failed with 127 | |
npm ERR! | |
npm ERR! Failed at the [email protected] test script. | |
npm ERR! This is most likely a problem with the nano package, | |
npm ERR! not with npm itself. | |
npm ERR! Tell the author that this fails on your system: | |
npm ERR! ./node_modules/ensure/bin/tap.js tests/*/*.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/Downloads/node-v0.6.0§ gdb --args out/Debug/node test/simple/test-assert.js | |
GNU gdb 6.3.50-20050815 (Apple version gdb-1515) (Sat Jan 15 08:33:48 UTC 2011) | |
Copyright 2004 Free Software Foundation, Inc. | |
GDB is free software, covered by the GNU General Public License, and you are | |
welcome to change it and/or distribute copies of it under certain conditions. | |
Type "show copying" to see the conditions. | |
There is absolutely no warranty for GDB. Type "show warranty" for details. | |
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries ........... done | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Using built-in specs. | |
Target: i686-apple-darwin10 | |
Configured with: /var/tmp/gcc/gcc-5666.3~6/src/configure --disable-checking --enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin10 --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 --target=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1 | |
Thread model: posix | |
gcc version 4.2.1 (Apple Inc. build 5666) (dot 3) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/Downloads/node-v0.6.0§ ./configure --debug && make && make test-all >> config-debug-make-make-test-all.log | |
Checking for program g++ or c++ : /usr/bin/g++ | |
Checking for program cpp : /usr/bin/cpp | |
Checking for program ar : /usr/bin/ar | |
Checking for program ranlib : /usr/bin/ranlib | |
Checking for g++ : ok | |
Checking for program gcc or cc : /usr/bin/gcc | |
Checking for gcc : ok | |
Checking for library dl : yes | |
Checking for openssl : yes |