Skip to content

Instantly share code, notes, and snippets.

View auser's full-sized avatar

Ari auser

View GitHub Profile
## That's one way...
# Think we can make this less ruby-specific?
solution :myapp do
cloud :db do
mysql :master => 1, :max_slaves => 4
end
cloud :web do
rails ...
solution :myapp do
cloud :db do
mysql :master => 1, :max_slaves => 4
end
cloud :web do
rails ...
nginx ...
end
define_defaults({
:access_key => Base.access_key,
:secret_access_key => Base.secret_access_key
})
pool :involver_rails do
cloud :nginx do
instances 2..2 # binds against 2 elastic IPs
has_package "nginx"
bind_to :app
end
cloud :app do
pool :apache_static_site do
cloud :web do
instances 1
enable :haproxy
using :vmrun do
vmx_hash({
"~/.vmware/one.vmwarevm/Ubuntu Linux 32bit.vmx" => "192.168.248.128"
})
pool :datashaman do
keypair "aws"
cloud :app do
instances 1
has_package 'vim'
enable :haproxy
has_package "rails"
-module(recess_controller).
-import(error_logger).
-export([
render/2, render/3,
render_error/2,
not_found/1, not_found/2,
method_not_allowed/1, method_not_allowed/2,
internal_server_error/1, internal_server_error/2,
ambiguous_routing/1
]).
#!/bin/bash
echo -n "Pick a color (blue, yellow, red ): "
read -e COLOR
echo It is a $COLOR day
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define MAX 1024
int main() {
int i =0;
char env[][MAX] = {"one", "two", "three" };
char **newenv = NULL;
-module(p81).
-compile(export_all).
bench(ProcN, MsgN) ->
ProcRing = for(1, ProcN, fun() -> spawn(fun wait/0) end),
statistics(runtime),
statistics(wall_clock),
sendMsgs(ProcRing, ping, ProcN*MsgN),
{_, Time1} = statistics(runtime),
{_, Time2} = statistics(wall_clock),