Unsere Setup-Routine für eine Rails-App mit Nginx, Passenger, rvm auf einen Host Europe-VPS mit Ubuntu 10.4.
apt-get update
apt-get install -y build-essential bison openssl libreadline5 libreadline5-dev curl \
I, Jason Huggins, the author of the work "CoffeeScript Web Server" (2010), irrevocably renounce | |
all current and future legal rights to the work in any medium whatsoever. | |
I stand behind the merit of the work, but disclaim all liability for it under law. | |
I encourage you, the audience, to share, copy, distribute, perform, remix, mash up, interpret, | |
excerpt, translate, and otherwise enjoy and use the work as you will. | |
I request that you acknowledge my authorship. |
# [sudo] gem install rack | |
# ruby -rubygems server.rb | |
# open http://localhost:9292 in browser. | |
require 'rack' | |
require 'erb' | |
TEMPLATE = File.read("template.erb") | |
server = lambda do |env| |
run "rm public/index.html" | |
file "Isolate", <<-END | |
gem "rails", "3.0.0" | |
gem "haml", "3.0.18" | |
gem "sqlite3-ruby", "1.3.1" | |
env :development do | |
gem "thin", "1.2.7" | |
gem "haml-rails", "0.2" |
<html> | |
<head> | |
<title>Age Dating Calculator</title> | |
<script> | |
<!-- | |
/* This function does the actual calculation as described in your email*/ | |
function calculate(age, worth) { | |
/* If they are less than 14 assume they wouldn't date anyone more than 1 year |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>Look ma, single css and js packages! (but not on dev mode).</title> | |
<%= include_packaged_styles "generic.css" %> | |
<%= include_packaged_scripts "generic.js" %> | |
<%= yield :head %> | |
</head> | |
<body> |
<?php | |
/** | |
* ======Usage===== | |
* | |
* $db = new Database("127.0.0.1","user","pwd","db1"); | |
* $data = $db->selectDb("db2") | |
* ->selectTable("table1") | |
* ->show("column1 as no1") | |
* ->filter("column1 >", 0) | |
* ->filter("column2 LIKE", "%hello%") |
package main | |
import ( | |
"websocket" | |
"http" | |
"fmt" | |
"io" | |
) | |
func EchoServer(ws *websocket.Conn) { |
install | |
url --url http://ftp.iij.ad.jp/pub/linux/centos/6.3/os/x86_64/ | |
# if you use proxy | |
# url --url http://ftp.iij.ad.jp/pub/linux/centos/6.3/os/x86_64/ --proxy http://proxy-ip:8080/ | |
lang en_US.UTF-8 | |
keyboard us | |
network --bootproto=dhcp | |
rootpw password | |
firewall --disabled | |
authconfig --enableshadow --passalgo=sha512 |
/* | |
use ver 2 | |
provide: | |
connection pool | |
auto reconnect | |
Usage: | |
MySql = require 'lib/mysql' This one | |
mysql = new MySql(Config) |