(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
set :rails_env, "production" | |
set :passenger_port, 9292 | |
set :passenger_cmd, "#{bundle_cmd} exec passenger" | |
namespace :deploy do | |
task :start, :roles => :app, :except => { :no_release => true } do | |
run "cd #{current_path} && #{passenger_cmd} start -e #{rails_env} -p #{passenger_port} -d" | |
end | |
task :stop, :roles => :app, :except => { :no_release => true } do |
defmodule Chat.Client do | |
# In all of the following functions 'server' stands for the server's pid | |
def join(server) do | |
send server, :join | |
end | |
def say(server, message) do | |
send server, { :say, message } | |
end |
This playbook has been removed as it is now very outdated. |
#!/usr/bin/env ruby | |
require 'em-websocket' | |
require 'thor' | |
module Handler | |
def initialize(args) | |
@ws = args | |
end | |
def receive_data(data) |
#chat-box.ubuntu.hidden-xs | |
.closed | |
.pull-right | |
= link_to_function content_tag(:i, nil, class: 'glyphicon glyphicon-chevron-up').html_safe, 'chat.show()' | |
.m-l-small | |
= link_to_function 'Chat with us', 'chat.show()' | |
.opened{style: 'display: none'} | |
.header | |
.pull-right | |
= link_to_function content_tag(:i, nil, class: 'glyphicon glyphicon-plus-sign').html_safe, 'chat.maximize()', class: 'maximize', style: 'display: none' |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
// Creating Google’s “Material Design” in SCSS | |
// (specifically Material Shadow, uses compass) | |
// see: http://www.google.com/design/spec/layout/layout-principles.html#layout-principles-paper-craft | |
// Demo: http://codepen.io/stoikerty/full/Glwxi/ | |
// Animating Box-Shadow is EXPENSIVE: | |
// http://www.html5rocks.com/en/tutorials/speed/high-performance-animations/#toc- | |
// Moving between z-index-depths is done via opacity & multiple |
# spec/support/database_cleaner.rb | |
# | |
# Set sane default for database cleaner and add a meta tag to enable database commits. | |
# This is important if you need to test after_commit callbacks in rails. (i.e. elasticsearch) | |
# | |
require 'database_cleaner' | |
RSpec.configure do |config| | |
config.before(:suite) do | |
DatabaseCleaner.strategy = :transaction |
Based on my recent experience of deployment, I've become rather frustrated with the deployment tooling in Elixir. This document is the result of me thinking to myself, "I wish we had x...". This document isn't meant to dishearten anyone who has built tooling for elixir - thank you so much for what you've done. This is meant more as what I personally see as something that would help a lot of Erlang/Elixir newbies like myself to be able to get deploying quickly and efficiently.
It should be possible to add in custom configuration to the bootstrap scripts. This would allow plugins to be able to add extra steps to the startup / shutdown / upgrade procedure. One way to implement this would be to make all scripts which handle bootstrapping or controlling the machine [.eex][1] templates. This would allow other parts of the release system to inject new functionality where needed.