Skip to content

Instantly share code, notes, and snippets.

@jastkand
jastkand / deploy.rb
Created June 26, 2017 06:31 — forked from noma4i/deploy.rb
Deploy Phoenix Elixir by mina
require 'mina/bundler'
require 'mina/git'
require 'mina/rbenv'
set :domain, 'your_domain.com'
set :deploy_to, '/home/deployer/app_name'
set :repository, 'git@github.com:user_name/app_name'
set :branch, ENV["brunch"] || 'master'
set :app_name, "app_name"

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@jastkand
jastkand / ability.rb
Created September 22, 2012 09:42 — forked from watson/ability.rb
Active Admin CanCan integration with shared front/backend User model and multi-level autherization
# app/models/ability.rb
# All front end users are authorized using this class
class Ability
include CanCan::Ability
def initialize(user)
user ||= AdminUser.new
case user.role
when "admin"