I hereby claim:
- I am fernandes on github.
- I am celsovjf (https://keybase.io/celsovjf) on keybase.
- I have a public key whose fingerprint is 9D00 08CD 3979 93B2 42CD E0F8 40DF 674A CECC B224
To claim this, I am signing this object:
| # Chapter 2: Designing Classes with Single Responsability | |
| Single Responsability | |
| * Ask Each Method: 'Class whats your :method?' | |
| * Hide Instance Variables | |
| * Hide Data Structures | |
| * Extract Extra Responsability From Methods | |
| Dependencies | |
| * Must known no Constant | |
| * Must _not_ call methods on other objects (constants) |
| (╯°□°)╯︵ ┻━┻ | |
| ¯\_(ツ)_/¯ | |
| oslǝɔ | |
| oslǝƆ | |
| osןǝɔ |
| # This class is an org | |
| class Organization < ActiveRecord::Base | |
| # @!attribute name | |
| # @return [String] The name of the task. | |
| # @!attribute description | |
| # @return [String] The description of the task. | |
| # @!attribute active | |
| # @return [Boolean] Marks whether the task is active or not. |
| # Operating System: OSX 10.10.3 | |
| # Boxen + Brew | |
| brew install libxml2 libxslt | |
| gem install nokogiri -- \ | |
| --use-system-libraries \ | |
| --with-xml2-lib=/opt/boxen/homebrew/opt/libxml2/lib \ | |
| --with-xml2-include=/opt/boxen/homebrew/opt/libxml2/include/libxml2 \ | |
| --with-xslt-lib=/opt/boxen/homebrew/opt/libxslt/lib \ |
| # If for any reason you need to reproduce the Rails Guides ActiveRecord examples | |
| # this gist will make your life easier | |
| ############################# | |
| ### Has Many / Belongs To ### | |
| ############################# | |
| # be rails g model Order order_date:datetime customer:references | |
| class Order < ActiveRecord::Base | |
| belongs_to :customer |
I hereby claim:
To claim this, I am signing this object:
| ## Vim | |
| ### Basic | |
| enable line numbers :set number | :set nu | |
| disable line numbers :set nonumber | :set nonu | :set nu! | |
| enable relative numbers :set relativenumber | |
| convert entire word to uppercace <leader>u | |
| convert entire word to lowercase <leader>l | |
| convert first char of word to uppercase <leader>U | |
| convert first char of word to lowercase <leader>L |
| # Cheat Sheet | |
| ## TMUX | |
| starts new session tmux new -s <name> | |
| attach deatached session tmux (a)ttach -t <name> | |
| list sessions tmux ls | |
| ### Windows | |
| new window ^a c | |
| list windows ^a w |
| #!/bin/bash | |
| while read pid; do | |
| ls -l /proc/${pid}/exe|awk -F" " '{print $11}' | |
| done < <(lsof|egrep libssl|awk -F" " '{print $2'})|sort -d|uniq |