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
postgresql: | |
pkg.installed: | |
- pkgs: | |
- libpq5 | |
- postgresql-client-9.2 | |
- postgresql-9.2 | |
- require: | |
- cmd.run: add_postgresql_apt_key | |
- file.managed: {{ pg_list }} | |
- file.managed: {{ pg_pref }} |
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
postgresql: | |
pkg: | |
- installed | |
- name: postgresql-9.2 | |
service: | |
- running | |
- require: | |
- pkg: postgresql-9.2 | |
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
<!DOCTYPE html> | |
<head> | |
<title>Snow</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"></script> | |
<script src="snow.js" type="text/javascript"/></script> | |
</head> | |
<body onload="init();"> | |
<canvas id="bgcanvas" width="410" height="316" style="position:absolute;z-index:2"></canvas> | |
<img src="globe_layers_2.png" style="position:absolute;z-index:3"> | |
<canvas id="fgcanvas" width="410" height="316" style="position:absolute;z-index:4"></canvas> |
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 :sandbox do | |
cloud :hello_world do | |
instances 1..1 | |
using :ec2 | |
keypair "/path/to/your/keypairs/<NAME>" | |
end | |
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
-module(hn_shell). | |
-compile([ export_all ]). | |
start() -> | |
Pid = spawn(?MODULE, print, [group_leader()]), | |
erlang:trace(all, true, [call, {tracer, Pid}]), | |
erlang:trace_pattern({error_logger, info_msg, '_'}, true, [local]). | |
print(Leader) -> |
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), |
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
#!/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
-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
pool :datashaman do | |
keypair "aws" | |
cloud :app do | |
instances 1 | |
has_package 'vim' | |
enable :haproxy | |
has_package "rails" |