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 \
# These are my notes from the PragProg book on CoffeeScript of things that either | |
# aren't in the main CS language reference or I didn't pick them up there. I wrote | |
# them down before I forgot, and put it here for others but mainly as a reference for | |
# myself. | |
# assign arguments in constructor to properties of the same name: | |
class Thingie | |
constructor: (@name, @url) -> | |
# is the same as: |
(function($, undefined) { | |
/** | |
* Unobtrusive scripting adapter for jQuery | |
* | |
* Requires jQuery 1.6.0 or later. | |
* https://github.com/rails/jquery-ujs | |
* Uploading file using rails.js | |
* ============================= |
# => Start private_pub (Faye) as Deamon | |
RAILS_ENV=production bundle exec rackup private_pub.ru -s thin -E production -D | |
# => find Process on Port x | |
fuser -n tcp 9292 | |
-> 9292/tcp: 3748 | |
# => kill process | |
kill -9 3748 |
#!/bin/sh | |
for that in `ps acx | grep -i $1 | awk {'print $1'}`; do | |
kill $that; | |
done |
## Show hidden files in TextMate by Chris Your | |
## https://gist.github.com/chrisyour/728445 | |
## File Patern | |
# old | |
!(/\.(?!htaccess)[^/]*|\.(tmproj|o|pyc)|/Icon\r|/svn-commit(\.[2-9])?\.tmp)$ | |
# new | |
!(/\.(?!\W*)[^/]*|\.(gitkeep|DS_Store|tmproj|o|pyc)|/Icon\r|/svn-commit(\.[2-9])?\.tmp)$ |
<!-- solution 1, 117b, inspired by http://www.p01.org/releases/140bytes_music_softSynth/ --> | |
<button onclick="new Audio('data:audio/wav;base64,UklGRl9vT19XQVZFZm10IBAAAAABAAEAQB8AAEAfAAABAAgAZGF0YU'+Array(1e3).join(123)).play()">Beep</button> | |
<!-- Solution 2, 107b, inspired by http://xem.github.io/chip8/c8.html --> | |
<button onclick="o=(A=new AudioContext()).createOscillator();o.connect(A.destination);o.start(0);setTimeout('o.stop(0)',500)">Boop</button> |
I followed this tutorial by Johnathan Leppert and the instructions from nginx_tcp_proxy_module but changed nginx to use passenger and thin.
tcp {