Skip to content

Instantly share code, notes, and snippets.

View auser's full-sized avatar

Ari auser

View GitHub Profile
var floatingButtonDirective = function() {
return {
restrict: 'AE',
scope: {
contents: '@'
},
template: '<div><div class="floating-button">Text: {{ contents }}</div></div>'
};
};
@auser
auser / 0_reuse_code.js
Created April 19, 2014 05:33
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
// list
var list = [
{
letter: 'A',
members: [
'Ari Lerner',
'Abe Linc'
]
},
{
solution :myapp do
cloud :db do
mysql :master => 1, :max_slaves => 4
end
cloud :web do
rails ...
nginx ...
end
## 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 ...
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
]).