This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am mattcantstop on github. | |
* I am mattcantstop (https://keybase.io/mattcantstop) on keybase. | |
* I have a public key ASAqeVr61ruTc_uRcoemK8PG90gKsmL1Fc9DEfSgDv1o8go | |
To claim this, I am signing this object: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let blacklists = ["*://youtube.com/*", "*://mail.google.com/*"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fruits = ["apple","rice","pizza","orange"] | |
fruits.each do |food_item| | |
if food_item == "apple" or food_item == "orange" | |
puts "I like to eat fruit" | |
else | |
puts "I like to eat #{food_item}" | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git_branch () { | |
if git rev-parse --git-dir >/dev/null 2>&1 | |
then echo -e "" [$(git branch 2>/dev/null| sed -n '/^\*/s/^\* //p')] | |
else | |
echo "" | |
fi | |
} | |
function git_color { | |
local STATUS=`git status 2>&1` | |
if [[ "$STATUS" == *'Not a git repository'* ]] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Duration | |
def self.calculate(duration) | |
times = {years: 31536000, months: 2678400, days: 86400, hours: 3600, minutes: 60, seconds: 1} | |
response = '' | |
duration = duration | |
times.each do |time, value| | |
numerator = duration / value if duration >= value | |
duration = duration % value if numerator | |
response << "#{numerator} #{time} " if numerator |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GENERAL ALIASES | |
alias ls='ls -Glah' | |
alias chrome='open /Applications/Google\ Chrome.app' | |
alias mail='open -a Mail.app' | |
alias todo='open -a Reminders.app' | |
# BUNDLE | |
alias b='bundle' | |
alias s='bundle exec rails s' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<i class="macbook"></i> |