This file contains hidden or 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
## 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 ... |
This file contains hidden or 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
solution :myapp do | |
cloud :db do | |
mysql :master => 1, :max_slaves => 4 | |
end | |
cloud :web do | |
rails ... | |
nginx ... | |
end | |
This file contains hidden or 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
define_defaults({ | |
:access_key => Base.access_key, | |
:secret_access_key => Base.secret_access_key | |
}) |
This file contains hidden or 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
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 |
This file contains hidden or 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
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" | |
}) |
This file contains hidden or 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
pool :datashaman do | |
keypair "aws" | |
cloud :app do | |
instances 1 | |
has_package 'vim' | |
enable :haproxy | |
has_package "rails" |
This file contains hidden or 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
-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 | |
]). |
This file contains hidden or 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
#!/bin/bash | |
echo -n "Pick a color (blue, yellow, red ): " | |
read -e COLOR | |
echo It is a $COLOR day |
This file contains hidden or 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
#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; |
This file contains hidden or 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
-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), |
OlderNewer