djb
みんなそろそろ D.J. Bernstein が世界史上最高のプログラマだというのを思い出すべきだと思うんだ。
まず、客観的な事実だけを見てみよう。 djb は2つの重要なシステムソフトウェアを書いた。 メールサーバと DNS サーバだ。 どちらも何百万というドメインで使われている。 ありとあらゆる複雑な仕事をこなし、とてつもない高負荷でも問題ないし、どんな異常事態にも対応する。 これらは、Bernstein が最初にリリースしたときとまったく同じものが動いてるのだ。
# Guide | |
# Configure the essential configurations below and do the following: | |
# | |
# Repository Creation: | |
# cap deploy:repository:create | |
# git add . | |
# git commit -am "initial commit" | |
# git push origin master | |
# | |
# Initial Deployment: |
djb
みんなそろそろ D.J. Bernstein が世界史上最高のプログラマだというのを思い出すべきだと思うんだ。
まず、客観的な事実だけを見てみよう。 djb は2つの重要なシステムソフトウェアを書いた。 メールサーバと DNS サーバだ。 どちらも何百万というドメインで使われている。 ありとあらゆる複雑な仕事をこなし、とてつもない高負荷でも問題ないし、どんな異常事態にも対応する。 これらは、Bernstein が最初にリリースしたときとまったく同じものが動いてるのだ。
# Drop this file in config/initializers to run your Rails project on Ruby 1.9. | |
# This is three separate monkey patches -- see comments in code below for the source of each. | |
# None of them are original to me, I just put them in one file for easily dropping into my Rails projects. | |
# Also see original sources for pros and cons of each patch. Most notably, the MySQL patch just assumes | |
# that everything in your database is stored as UTF-8. This was true for me, and there's a good chance it's | |
# true for you too, in which case this is a quick, practical solution to get you up and running on Ruby 1.9. | |
# | |
# Andre Lewis 1/2010 | |
# encoding: utf-8 |
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
# You have to define Gemspec files for Rails 2.3 libraries. A commit bellow will help it: | |
# http://github.com/jpzwarte/rails/commit/55ede36d8907f481b18fcefa21d099f69ae9965b | |
# Load rails from github | |
git 'git://github.com/reallyenglish/rails.git', :branch => '2-3-re', :ref => '1760b049f43ba2ab32eb47fdc42f5638115aeb8a' do | |
%w(active_support active_record action_pack action_mailer active_resource).each { |lib| gem lib.sub(/_/,''), '2.3.8', :require=>lib} | |
gem 'rails', '2.3.8' | |
end | |
# Load rails from your local |
# compl1.rb - Redis autocomplete example | |
# download female-names.txt from http://antirez.com/misc/female-names.txt | |
require 'rubygems' | |
require 'redis' | |
r = Redis.new | |
# Create the completion sorted set | |
if !r.exists(:compl) |
rpm -Uvh --force --nosignature --nodigest http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm | |
rpm -Uvh --force --nosignature --nodigest http://download.elff.bravenet.com/5/i386/elff-release-5-3.noarch.rpm | |
yum install -y curl ftp rsync sudo time wget which git-core | |
yum install -y gcc bzip2 make kernel-devel-`uname -r` | |
yum install -y gcc-c++ zlib-devel openssl-devel readline-devel | |
yum erase -y wireless-tools gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts | |
service vboxadd status 2>&1 >> /dev/null | |
if [ $? -eq 1 ]; then |
:+1: | |
:-1: | |
:airplane: | |
:art: | |
:bear: | |
:beer: | |
:bike: | |
:bomb: | |
:book: | |
:bulb: |
# Additional caching and such might be helpful for performance. | |
# Sass's regeneration only on changed files should work as long as the server provides the Last-Modified header | |
require 'net/http' | |
require 'time' | |
require 'sass' | |
module Sass | |
module Importers | |
# Importer which issues HTTP requests |
#!/bin/sh | |
set -e | |
# Example init script, this can be used with nginx, too, | |
# since nginx and unicorn accept the same signals | |
# Feel free to change any of the following variables for your app: | |
TIMEOUT=${TIMEOUT-60} | |
APP_ROOT=/path/to/your/app/current | |
PID=$APP_ROOT/tmp/pids/unicorn.pid | |
ENVIRONMENT=production |