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
WHITE="\[\033[00m\]" | |
RED="\[\033[31m\]" | |
GREEN="\[\033[32m\]" | |
# Git branch in prompt. | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/' | |
} | |
export PS1="\u@\h $RED\W$WHITE::$GREEN\$(parse_git_branch)$WHITE $ " |
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
$(".content-editor > .content").sortable | |
items: ".plugin" | |
handle: ".head" |
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
#!/usr/bin/env bash | |
# Simple move this file into your Rails `script` folder. Also make sure you `chmod +x puma.sh`. | |
# Please modify the CONSTANT variables to fit your configurations. | |
# The script will start with config set by $PUMA_CONFIG_FILE by default | |
PUMA_CONFIG_FILE=config/puma.rb | |
PUMA_PID_FILE=tmp/pids/puma.pid | |
PUMA_SOCKET=tmp/sockets/puma.sock |
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
# Capistrano 3 tasks for Puma | |
namespace :puma do | |
%w[start stop restart status].each do |command| | |
desc "#{command} puma" | |
task command do | |
on roles (:app) do | |
within current_path do | |
execute "bin/puma.sh", "#{command} -c config/puma/#{fetch(:stage)}.rb" |
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
gem 'capistrano', github: "capistrano/capistrano" | |
gem 'capistrano-bundler', github: "capistrano/bundler" | |
gem 'capistrano-rvm', github: "capistrano/rvm" | |
gem 'capistrano-rails', github: "capistrano/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 ActionMailer | |
class Base | |
class_inheritable_accessor :view_paths | |
def self.prepend_view_path(path) | |
view_paths.unshift(*path) | |
ActionView::TemplateFinder.process_view_paths(path) | |
end | |
def self.append_view_path(path) |
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
LeaveBenefit.attribute_names.collect { |att| att.to_sym } |
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.exports = (grunt) -> | |
# Project configuration. | |
grunt.initConfig | |
coffee: | |
options: | |
sourceMap: false | |
app: | |
expand: true | |
cwd: 'public/js/coffee/' |
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
ssh [email protected] | |
ssh [email protected] | |
mkdir -p ~/.ssh | |
cat ~/.ssh/id_rsa.pub | ssh [email protected] 'cat >> ~/.ssh/authorized_keys' | |
cat ~/.ssh/id_rsa.pub | ssh [email protected] 'cat >> ~/.ssh/authorized_keys' | |
User: 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
def silence &block | |
(begin; yield; rescue; end;) if block_given? | |
end |