Skip to content

Instantly share code, notes, and snippets.

View afenix's full-sized avatar

Alister A. Fenix afenix

  • WayFind LLC
View GitHub Profile
@afenix
afenix / .bash_profile
Created August 26, 2015 03:11
bash_profile with Git shortcuts and colors added
# Enable tab completion
source ~/git-completion.bash
# colors!
green="\[\033[0;32m\]"
blue="\[\033[0;34m\]"
purple="\[\033[0;35m\]"
reset="\[\033[0m\]"
# Change command prompt
@afenix
afenix / gist:d1deeba4e53810314833
Created July 16, 2015 22:51
Highlight non-ascii characters by extending Sublime Highlighter Package
// First install the Sublime Text 2/3 package named Highlighter
// then update the user settings here: highlighter.sublime-settings -User
{
"highlighter_enabled": true,
"highlighter_regex": "(\t+ +(?![*]))|( +\t+)|[^\\x00-\\x7F]|[\u2026\u2018\u2019\u201c\u201d\u2013\u2014]|[\t ]+$",
"highlighter_scope_name": "invalid",
"highlighter_scope_name_cool": "constant.character.entity.html",
"highlighter_max_file_size": 1048576,
"highlighter_delay": 3000
@afenix
afenix / Code-With-Me-#1.markdown
Created March 19, 2015 06:18
Code With Me #1

Active Record naming conventions

Class name    Table name      In belongs_to             In has_many               In has_and_belongs_to_many  
-----------------------------------------------------------------------------------------------------------------------
Task          tasks           belongs_to(:task)         has_many(:tasks)          has_and_belongs_to_many(:tasks)
Person        people          belogns_to(:person)       has_many(:people)         has_and_belongs_to_many(:people)
CreditCard    credit_cards    belongs_to(:credit_card)  has_many(:credit_cards)   has_and_belongs_to_many(:credit_cards)

singular plural singular snake case plural snake case plural snake case