I use the latest Puma v1.4.0 from rubygems.
Make sure you have nginx installed with these options:
>/opt/nginx/sbin/nginx -V
nginx version: nginx/1.0.15
built by gcc 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)
| [user] | |
| name = xxxx | |
| email = xxx@gmail.com | |
| [alias] | |
| co = checkout | |
| ci = commit -a -v | |
| st = status | |
| br = branch | |
| throw = reset --hard HEAD | |
| throwh = reset --hard HEAD^ |
| <meta name="author" content="{{ site.author }}"> | |
| {% capture description %}{% if page.description %}{{ page.description }}{% elsif site.description %}{{ site.description }}{%else%}{{ content | raw_content }}{% endif %}{% endcapture %} | |
| <meta name="description" content="{{ description | strip_html | condense_spaces | truncate:150 }}"> | |
| {% if page.keywords %}<meta name="keywords" content="{{ page.keywords }}">{%else%}<meta name="keywords" content="{{ site.keywords }}">{% endif %} |
| base: &base | |
| adapter: sqlite3 | |
| timeout: 5000 | |
| development: | |
| database: <%= shared_path %>/db/development.sqlite3 | |
| <<: *base | |
| test: | |
| database: <%= shared_path %>/db/test.sqlite3 | |
| <<: *base | |
| production: |
| server { | |
| listen 80 default; | |
| server_name example.com; | |
| client_max_body_size 4G; | |
| keepalive_timeout 5; | |
| root /u/app/fruitwood/current/public; | |
| try_files $uri/index.html $uri.html $uri @unicorn; | |
| location @unicorn { |
| # NOTICE: to get Nginx+Unicorn best-practices configuration see the gist https://gist.github.com/3052776 | |
| $ cd /usr/src | |
| $ wget http://nginx.org/download/nginx-1.2.1.tar.gz | |
| $ tar xzvf ./nginx-1.2.1.tar.gz && rm -f ./nginx-1.2.1.tar.gz | |
| $ wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.30.tar.gz | |
| $ tar xzvf pcre-8.30.tar.gz && rm -f ./pcre-8.30.tar.gz | |
| $ wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz |
I use the latest Puma v1.4.0 from rubygems.
Make sure you have nginx installed with these options:
>/opt/nginx/sbin/nginx -V
nginx version: nginx/1.0.15
built by gcc 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)
| #!/bin/bash | |
| ETH=$1 | |
| ETH=${ETH:-eth0} | |
| IP=`ifconfig $ETH|awk -F '[ :]+' '/inet addr/{print $4}'` | |
| while true;do | |
| let I+=1 | |
| NOW=`date +"%F %T"` | |
| TX1=`ifconfig $ETH|grep bytes|awk -F '[ :]+' '{print $9}'` |
| #!/usr/bin/env ruby | |
| # | |
| # ARGV[0] - msg | |
| # ARGV[1] - mailto | |
| # ARGV[2] - filename | |
| require 'open-uri' | |
| require 'rubygems' | |
| require 'action_mailer' |
| #!/usr/bin/env ruby | |
| # | |
| # ARGV[0] - msg | |
| # ARGV[1] - mailto | |
| require 'open-uri' | |
| require 'rubygems' | |
| require 'action_mailer' | |
| ActionMailer::Base.smtp_settings = { |