Kind of continue from the other gist how to install LAMP on an Amazon AMI
##Install git
sudo yum install git-core
##Create ssh directory since it doesn't exists by default on the Amazon AMI
#! /usr/bin/python | |
# -*- coding: utf-8 -*- | |
# | |
# Simple XML validator done while learning the use of lxml library. | |
# -- Juhamatti Niemelä <iiska AT iki DOT fi> | |
import lxml | |
from lxml import etree | |
if __name__ == "__main__": |
[submodule "amqp"] | |
path = amqp | |
url = http://github.com/ry/node-amqp.git |
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
// includes bindings for fetching/fetched | |
var PaginatedCollection = Backbone.Collection.extend({ | |
initialize: function() { | |
_.bindAll(this, 'parse', 'url', 'pageInfo', 'nextPage', 'previousPage'); | |
typeof(options) != 'undefined' || (options = {}); | |
this.page = 1; | |
typeof(this.perPage) != 'undefined' || (this.perPage = 10); | |
}, | |
fetch: function(options) { |
Kind of continue from the other gist how to install LAMP on an Amazon AMI
##Install git
sudo yum install git-core
##Create ssh directory since it doesn't exists by default on the Amazon AMI
This gist assumes:
This is a simple way to backup your MySQL tables to Amazon S3 for a nightly backup - this is all to be done on your server :-)
Sister Document - Restore MySQL from Amazon S3 - read that next
this is for Centos 5.6, see http://s3tools.org/repositories for other systems like ubuntu etc
server { | |
listen 80; | |
server_name localhost; | |
root /home/website/web; | |
rewrite ^/app\.php/?(.*)$ /$1 permanent; | |
try_files $uri @rewriteapp; | |
location @rewriteapp { |
import redis | |
from redis import WatchError | |
import time | |
RATE = 0.1 | |
DEFAULT = 100 | |
TIMEOUT = 60 * 60 | |
DEBUG = False |
from fabric.api import * | |
from fabric.colors import green | |
env.hosts = ['my_user@my_host'] | |
env.password = 'my_password' | |
env.app_path = 'my/app/path' | |
def commit(): | |
print(green("Commit last modifs...")) | |
local('git add -A && git commit') |