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 fs = require('fs'); | |
var writeStream = fs.createWriteStream('/Users/asus/Documents/work/writeStream.txt'); | |
var interval = setInterval(function() { | |
var flushed = writeStream.write((new Date()).toString() + '\n'); | |
console.log('flushed: ', flushed); | |
}, 100); | |
setTimeout(function() { |
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'); | |
function randomFileName() { | |
return '/' + Date.now() + '_' + Math.random() * 1000000 + '.txt'; | |
} | |
http.createServer(function(req, res) { | |
var fileName = randomFileName(); | |
console.log('writing request to', fileName); |
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
# | |
# script to register Python 2.0 or later for use with win32all | |
# and other extensions that require Python registry settings | |
# written by Joakim Loew for Secret Labs AB / PythonWare | |
# | |
# source: | |
# http://www.pythonware.com/products/works/articles/regpy20.htm | |
# | |
# modified by Valentine Gogichashvili as described in http://www.mail-archive.com/[email protected]/msg10512.html | |
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
> chcp 65001 | |
> set PYTHONIOENCODING=utf-8 | |
> python example.py | |
Encoding is utf-8 |
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 https://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
var net = require('net'); | |
var count = 0; | |
var users = {}; | |
var server = net.createServer(function (conn) { | |
conn.write( | |
'\n > welcome to \033[92mnode-chat\033[39m!' | |
+ '\n > ' + count + ' other people are connnected at this time.' | |
+ '\n> please write your name and press enter: '); | |
count++; |
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
require('dnode').connect(8090, function(remote) { console.dir(remote)}); |
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
The evolution of various data models in databases | |
Advantages of object-oriented databases in terms of horizontal scaling | |
Handling issues when columns are added or deleted between application versions | |
Suitability of MongoDB for the cloud | |
OS support and usage with MongoDB | |
The company (10gen) wrapped around MongoDB | |
Community involvement in the development of MongoDB | |
Scott Swigart: To start, can you introduce yourself, 10gen, and the role of open source behind it? |
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
Show hidden characters
[ | |
{ "keys": ["j", "j"], "command": "exit_insert_mode", | |
"context": | |
[ | |
{ "key": "setting.command_mode", "operand": false }, | |
{ "key": "setting.is_widget", "operand": false } | |
] | |
}, | |
{ "keys": ["ctrl+d"], "command": "find_under_expand" }, | |
{ "keys": ["ctrl+t"], "command": "toggle_setting", |
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
#/bin/bash | |
for PROC in `ls /proc/|grep "^[0-9]"` | |
do | |
if [ -f /proc/$PROC/statm ]; then | |
TEP=`cat /proc/$PROC/statm | awk '{print ($2)}'` | |
RSS=`expr $RSS + $TEP` | |
fi | |
done | |
RSS=`expr $RSS \* 4 / 1024` | |
PageTable=`grep PageTables /proc/meminfo | awk '{print $2 / 1024}'` |