View rails http status codes
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing

Remove MySQL completely

  1. Open the Terminal

  2. Use mysqldump to backup your databases

  3. Check for MySQL processes with: ps -ax | grep mysql

  4. Stop and kill any MySQL processes

  5. Analyze MySQL on HomeBrew:

    brew remove mysql

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

View my_commandline_cheatsheet.markdown

To compress a folder

tar -zcvf tar-archive-name.tar.gz source-folder-name

To un-compress a tar.gz

tar -zxvf tar-archive-name.tar.gz

View Octopress Blogging
===Install Octopress===
git clone git://
cd octopress
gem install bundler rake --no-rdoc --no-ri
bundle install
rake install
===Start Blogging===
View cloudinary.yml
cloud_name: cloud_name
api_key: 'api_key'
api_secret: api_secret
enhance_image_tag: true
static_image_support: false
cloud_name: cloud_name
api_key: 'api_key'

It looks as though using Release Phase commands (available as of 2 June 2016) is the preferred way of running things like migrations after the slug has been compiled and deployed.

The Buildpack API explicitly suggests avoiding side effects during the build:

Buildpack developers should avoid generating side effects during the build. For example, it is not recommended to perform database migrations in the compile script.

The following example creates a Rails app with a single migration and demonstrates that the migration is run after deployment.

# Create empty Rails app
View not_found.haml
=# image_tag('page_not_found.jpg', 'image not found')
= image_tag("404.jpg", size: "100x200", alt: "page not found")
%h1 OOPS!!!!!
%p We’re sorry but it appears that we can’t find the page you were looking for. Usually this occurs because of a page that previously existed was removed or you’ve mistyped the address.
%a{:href => "/"} Go back
View errors_controller.rb
# encoding: utf-8
class ErrorsController < ApplicationController
skip_before_action :authenticate_user!
def not_found
respond_to do |format|
format.html { render status: 404 }
View how to screencapture and make animated gifs or

Screencapture and animated gifs

I say "animated gif" but in reality I think it's irresponsible to be serving "real" GIF files to people now. You should be serving gfy's, gifv's, webm, mp4s, whatever. They're a fraction of the filesize making it easier for you to deliver high fidelity, full color animation very quickly, especially on bad mobile connections. (But I suppose if you're just doing this for small audiences (like bug reporting), then LICEcap is a good solution).

Capturing (Easy)

  1. Launch quicktime player
  2. do Screen recording

screen shot 2014-10-22 at 11 16 23 am