##Refs
Add to Gemfile: gem 'wicked_pdf'
[user] | |
name = Your Name | |
email = your@email.com | |
[alias] | |
co = checkout | |
ci = commit -am | |
br = checkout -b | |
s = status -s | |
r = remote -v | |
lg = log --oneline --decorate --all --graph |
* Review this article and add new steps as needed: http://blog.therubymug.com/blog/2010/05/20/the-install-osx.html |
gem install pg -v '0.18.4' -- --with-pg-config=/Applications/Postgres.app/Contents/Versions/latest/bin/pg_config |
postgres=# \dx | |
List of installed extensions | |
Name | Version | Schema | Description | |
---------+---------+------------+------------------------------ | |
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language | |
(1 row) | |
postgres=# \dx+ | |
Objects in extension "plpgsql" | |
Object Description |
##----GIT------ | |
alias gs='clear ;and git status' | |
alias gb='git branch' | |
alias gbranch='git rev-parse --abbrev-ref HEAD' #get current branch name | |
alias gl="clear ;and git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" | |
alias gt='git tag' | |
alias grm='git rm' | |
alias gps='git push' | |
alias gbi='git bisect' | |
alias gbg='git bisect good' |
class ApplicationController < ActionController::Base | |
# ... | |
unless Rails.application.config.consider_all_requests_local | |
rescue_from Exception, with: lambda { |exception| render_error 500, exception } | |
rescue_from ActionController::RoutingError, ActionController::UnknownController, ::AbstractController::ActionNotFound, ActiveRecord::RecordNotFound, with: lambda { |exception| render_error 404, exception } | |
end | |
private | |
def render_error(status, exception) |
##Refs
Add to Gemfile: gem 'wicked_pdf'
Here we use Homebrew to install rbenv:
brew update; and brew install rbenv ruby-build
~/.rbenv/shims
to your PATHrbenv install 2.2.2
and rbenv rehash
rbenv global 2.2.2
Now you can run gem install bundler
and bundle install
within your Ruby project.
doctype html | |
html | |
head | |
title My App | |
meta name="viewport" content="width=device-width, initial-scale=1.0" | |
= stylesheet_link_tag "application", media: 'all', 'data-turbolinks-track' => true | |
= javascript_include_tag "application", 'data-turbolinks-track' => true | |
= csrf_meta_tags | |
body |
How to setup Heroku Hostname SSL with GoDaddy SSL Certificate and Zerigo DNS | |
Heroku recently added an exciting new 'Hostname SSL' option. This option offers the broad compatibility of IP-based SSL, but at 1/5 the price ($20 / month at the time of this writing). | |
The following tutorial explains how to use Heroku's new 'Hostname SSL' option on your Heroku project. Before we begin, let's list what we're using here: | |
* Heroku Hostname SSL | |
* GoDaddy Standard SSL Certificate | |
* Zerigo DNS |