A standard git commit message typically should follow this format:
<type>(<scope>): <subject>
<description>
| 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 |
| # Fetch commits from most recent commit to branch | |
| git log $(git describe --tags --abbrev=0)..HEAD --oneline | |
| # Fetch commits between most recent two tags | |
| git log ^$(git describe --tags $(git rev-list --tags --reverse --max-count=2) --abbrev=0 | xargs) --oneline |
| # Doesn't work | |
| <p> | |
| <% case @request.author_hosted %> | |
| <% when "yes" %> | |
| The school <b>has</b> hosted an author before. | |
| <% when "no" %> | |
| The school <b>has not</b> hosted an author before. | |
| <% end %> | |
| </p> |
| # app/models/experience.rb | |
| # | |
| # == Schema Information | |
| # | |
| # Table name: experiences | |
| # | |
| # id :integer not null, primary key | |
| # title :string | |
| # description :text | |
| # created_at :datetime not null |
| .pear_pagination { | |
| text-align: center; | |
| padding: 1em; | |
| cursor: default; | |
| } | |
| .pear_pagination a, | |
| .pear_pagination span { | |
| padding: 0.2em 0.3em; | |
| } | |
| .pear_pagination .disabled { |
| httpClient.DefaultRequestHeaders.Authorization = | |
| new AuthenticationHeaderValue( | |
| "Basic", | |
| Convert.ToBase64String( | |
| System.Text.ASCIIEncoding.ASCII.GetBytes( | |
| string.Format("{0}:{1}", username, password)))); |
The goal of this cheatsheet is to make it easy to add hand-rolled authentication to any rails app in a series of layers.
First the simplest/core layers, then optional layers depending on which features/functionality you want.
Specs |
|
|---|---|
| AUTHOR | Ira Herman |
| LANGUAGE/STACK | Ruby on Rails Version 4 or 5 |
| #.bash_aliases | |
| # enable color support of ls and also add handy aliases | |
| if [ -x /usr/bin/dircolors ]; then | |
| test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" | |
| alias ls='ls --color=auto' | |
| alias grep='grep --color=auto' | |
| fi | |
| pushFunc(){ |