This file contains 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/sh | |
# | |
# redis - this script starts and stops the redis-server daemon | |
# | |
# chkconfig: - 85 15 | |
# description: Redis is a persistent key-value database | |
# processname: redis-server | |
# config: /etc/redis/6379.conf | |
# config: /etc/sysconfig/redis | |
# pidfile: /var/run/redis_6379.pid |
This file contains 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
sudo yum install gcc | |
wget http://download.redis.io/redis-stable.tar.gz | |
tar xvzf redis-stable.tar.gz | |
cd redis-stable | |
make | |
sudo make install | |
sudo mkdir /etc/redis | |
sudo mkdir /var/redis | |
sudo cp redis.conf /etc/redis/6379.conf |
This file contains 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/sh | |
NODE_BRANCH=v0.10.38-release | |
sudo yum install -y make git gcc-c++ | |
echo 'sleeping for 2 seconds now...' | |
sleep 2 | |
git clone https://github.com/joyent/node.git | |
cd node |
This file contains 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 rs = fs.createReadStream('bla.txt'); | |
var ws = fs.createWriteStream('bla2.txt'); | |
ws.on('finish', function() { | |
console.log('yey!'); | |
}); |
This file contains 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 ec2-user soft nofile 999999 >> /etc/security/limits.conf | |
echo ec2-user hard nofile 999999 >> /etc/security/limits.conf | |
echo root soft nofile 999999 >> /etc/security/limits.conf | |
echo root hard nofile 999999 >> /etc/security/limits.conf | |
echo net.core.rmem_max = 33554432 >> /etc/sysctl.conf | |
echo net.core.wmem_max = 33554432 >> /etc/sysctl.conf | |
echo net.ipv4.tcp_rmem = 4096 16384 33554432 >> /etc/sysctl.conf | |
echo net.ipv4.tcp_wmem = 4096 16384 33554432 >> /etc/sysctl.conf | |
echo net.ipv4.tcp_mem = 786432 1048576 26777216 >> /etc/sysctl.conf |
This file contains 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
node.js:375 | |
throw new Error(msg); | |
^ | |
Error: (node) warning: Recursive process.nextTick detected. This will break in the next version of node. Please use setImmediate for recursive deferral. | |
at maxTickWarn (node.js:375:15) | |
at process._nextDomainTick (node.js:498:9) | |
at emitReadable (_stream_readable.js:400:13) | |
at readableAddChunk (_stream_readable.js:165:9) | |
at EncryptedStream.Readable.push (_stream_readable.js:127:10) | |
at EncryptedStream.read [as _read] (tls.js:510:10) |
This file contains 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
TARGET=zeromq-4.0.5 | |
sudo yum install libuuid-devel uuid-devel | |
wget http://download.zeromq.org/$TARGET.tar.gz | |
tar -xzf $TARGET.tar.gz | |
cd $TARGET | |
./configure | |
make | |
sudo make install | |
sudo sh -c 'echo /usr/local/lib > /etc/ld.so.conf.d/zmq.conf' | |
sudo ldconfig |
This file contains 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
//Pattern 1 | |
var stream1 = fs.createWriteStream('some/path1'); | |
function write1() { | |
var more = stream1.write('something1'); | |
if (more) | |
write1(); | |
else | |
stream1.once('drain', write1); |
This file contains 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
sudo yum install -y make | |
echo 'sleeping for 2 seconds now...' | |
sleep 2 | |
sudo yum install -y git | |
echo 'sleeping for 2 seconds now...' | |
sleep 2 | |
sudo yum install -y gcc-c++ | |
echo 'sleeping for 2 seconds now...' |
This file contains 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
wget --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" "http://download.oracle.com/otn-pub/java/jdk/7u45-b18/jdk-7u45-linux-x64.rpm" | |
sudo rpm -ivh jdk-7u45-linux-x64.rpm | |
sudo rpm -Uvh jdk-7u45-linux-x64.rpm | |
echo 'sleeping 5 seconds' | |
sleep 5 | |
rm jdk-7u45-linux-x64.rpm |
OlderNewer