This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# builds an authenticated S3 query string without having | |
# to connect to the server first | |
class S3QueryString < String | |
def initialize(path, bucket, options = {}) | |
super() | |
@access_key_id = options[:access_key_id] | |
@secret_access_key = options[:secret_access_key] | |
@bucket = bucket |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.application.shared.ui.controls | |
{ | |
import flash.display.DisplayObject; | |
import flash.display.StageDisplayState; | |
import flash.events.Event; | |
import flash.events.FullScreenEvent; | |
import flash.events.KeyboardEvent; | |
import flash.events.MouseEvent; | |
import flash.events.TimerEvent; | |
import flash.geom.Rectangle; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Edit the file /var/www/vhosts/:virtual_host/conf/httpd.include | |
Replace #{server_ip}, :domain_name, :virtual_host, :application, #{application_port} with your own details. | |
--- | |
<VirtualHost #{server_ip}:80> | |
ServerName :domain_name:80 | |
ServerAlias *.:domain_name | |
DocumentRoot /var/www/vhosts/:virtual_host/:application/public | |
<Directory /var/www/vhosts/:virtual_host/:application/public> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
touch /etc/init.d/supervisord.init | |
--- edit the file to look like the following: | |
# chkconfig: 345 20 80 | |
# description: Manages processes | |
/usr/bin/supervisord | |
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo_supervisord_conf > /etc/supervisord.conf #sets up the sample supervisor configuration. | |
-- now edit the file and add your application details. Here is a sample. Replace :virtual_host with your virtual host name. | |
[program:myapp] | |
command=/var/www/vhosts/:virtual_host/application/start.sh | |
autostart=true | |
autorestart=true | |
startretries=3 | |
stdout_logfile=/var/www/vhosts/:virtual_host/application/log/server.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
touch /var/www/vhosts/:virtual_host/application/start.sh | |
--- edit the file to include the following. Replace :virtual_host and :application.js with your own files. | |
#! /bin/sh | |
cd /var/www/vhosts/:virtual_host/application | |
/usr/local/bin/node :application.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir -p /var/www/vhosts/:virtual_host/application/log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
easy_install supervisor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ~/src | |
wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c8.tar.gz | |
tar xfvz setuptools-0.6c8.tar.gz | |
cd setuptools-0.6c8 | |
python setup.py build | |
python setup.py install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir -p ~/src && cd ~/src && git clone git://github.com/ry/node.git | |
cd node/deps/udns && ./configure && make | |
cd .. && ./configure && make && make install |