Skip to content

Instantly share code, notes, and snippets.

[ jedi ] tail # npm install tail
npm WARN package.json cradle@0.6.6 No repository field.
npm http GET https://registry.npmjs.org/tail
npm http 200 https://registry.npmjs.org/tail
npm http GET https://registry.npmjs.org/tail/-/tail-0.3.5.tgz
npm http 200 https://registry.npmjs.org/tail/-/tail-0.3.5.tgz
tail@0.3.5 ../node_modules/tail
[ jedi ] tail # touch logfile
[ jedi ] tail # vim tail.js
[ jedi ] tail # node tail.js &
[root@git awd]# npm install lodash
npm http GET https://registry.npmjs.org/lodash
npm http 200 https://registry.npmjs.org/lodash
npm http GET https://registry.npmjs.org/lodash/-/lodash-2.4.1.tgz
npm http 200 https://registry.npmjs.org/lodash/-/lodash-2.4.1.tgz
lodash@2.4.1 node_modules/lodash
[root@git awd]# vim checklodash.js
[root@git awd]# node checklodash.js
[root@git awd]# cat checklodash.js
var lodash = require('lodash');
@ndrut
ndrut / gist:8475401
Created January 17, 2014 15:35
EPELRPM install nodejs 32-bit Centos6
[root@nodetest ~]# yum install http://mirror.compevo.com/epel/6/i386/epel-release-6-8.noarch.rpm
Loaded plugins: fastestmirror
Determining fastest mirrors
* base: mirror.trouble-free.net
* extras: centos.someimage.com
* updates: mirror.atlanticmetro.net
base | 3.7 kB 00:00
extras | 3.4 kB 00:00
updates | 3.4 kB 00:00
updates/primary_db | 1.3 MB 00:00
[root@chat ~]# yum install nodejs
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/metalink | 14 kB 00:00
* base: mirror.trouble-free.net
* epel: ftp.osuosl.org
* extras: mirror.trouble-free.net
* updates: ftp.osuosl.org
base | 3.7 kB 00:00
epel | 4.2 kB 00:00
Home:
Start: Sat Jan 18 15:27:28 2014
HOST: desktop.tyne.io Loss% Snt Last Avg Best Wrst StDev
1.|-- 192.168.1.1 0.0% 20 0.5 0.4 0.4 0.5 0.0
2.|-- 73.209.216.1 0.0% 20 7.7 7.8 6.9 11.4 1.1
3.|-- xe-4-0-0-32767-sur01.bearcreek.tx.houston.comcast.net 0.0% 20 8.1 8.8 6.5 32.9 5.7
4.|-- ae-15-0-ar04.bearcreek.tx.houston.comcast.net 0.0% 20 11.9 9.8 6.6 27.3 4.5
5.|-- he-3-5-0-0-10-cr01.dallas.tx.ibone.comcast.net 0.0% 20 13.3 14.8 12.7 16.9 1.1
6.|-- 68.86.85.49 0.0% 20 46.7 46.7 43.6 51.5 2.0
@ndrut
ndrut / gist:8499580
Created January 19, 2014 02:14
1/18 8:14PM CST NYC2 DigitalOcean Latency
Start: Sat Jan 18 20:11:31 2014
HOST: desktop.tyne.io Loss% Snt Last Avg Best Wrst StDev
1.|-- 192.168.1.1 0.0% 20 0.4 0.4 0.4 0.5 0.0
2.|-- 73.209.216.1 0.0% 20 7.8 7.7 6.6 8.9 0.3
3.|-- xe-4-0-0-32767-sur01.bearcreek.tx.houston.comcast.net 0.0% 20 8.1 9.5 7.0 26.1 4.3
4.|-- ae-15-0-ar04.bearcreek.tx.houston.comcast.net 0.0% 20 8.7 9.4 6.4 25.2 4.3
5.|-- he-3-7-0-0-10-cr01.dallas.tx.ibone.comcast.net 0.0% 20 15.5 16.4 12.7 31.1 4.7
6.|-- 68.86.87.233 0.0% 20 32.4 34.4 30.7 45.3 3.1
7.|-- he-0-15-0-0-cr01.ashburn.va.ibone.comcast.net 0.0% 20 47.0 47.0 44.0 57.3 2.6
8.|-- 68.86.87.182 0.0% 20 52.1 52.6 49.5 59.5 2.1
@ndrut
ndrut / gist:8564489
Created January 22, 2014 18:32
ex ghost nginx vhost
upstream ghost {
server 127.0.0.1:2368;
}
server {
listen 80;
server_name blog.xxxxxx.com;
server {
listen 80;
server_name xenithltd.com;
return 301 http://www.xenithltd.com$requesturi
}
server {
listen 80;
server_name www.xenithltd.com;
root /var/www/xenithltd.co.uk/public/;
fastcgi_cache_path /var/lib/nginx/cache levels=1:2 keys_zone=c5:10m inactive=5m;
fastcgi_cache_key "$scheme$request_method$host$request_uri";
fastcgi_cache_use_stale error timeout invalid_header http_500;
[mysqld]
innodb_file_per_table=1 # Ensure that each innodb table is it's own binary data block just in case there's corruption.
query_cache_size=16M
thread_cache_size=4 # can be increased on servers with large numbers of active users
key_buffer_size=16M
max_allowed_packet=8M # don't change unless required for large blobs
table_cache=246 # max 2048, can be increased if more Opened tables - SHOW STATUS LIKE 'Opened_tables';
wait_timeout=300 # can be increased if using persistent connections
max_user_connections=25
open_files_limit=1024