This file contains 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
# echo is like puts for bash (bash is the program running in your terminal) | |
echo "Loading ~/.bash_profile a shell script that runs in every new terminal you open" | |
# $VARIABLE will render before the rest of the command is executed | |
echo "Logged in as $USER at $(hostname)" | |
# Load git completions | |
git_completion_script=/usr/local/etc/bash_completion.d/git-completion.bash | |
test -s $git_completion_script && source $git_completion_script |
This file contains 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
# Make TabWidth be 2 in TextEdit | |
defaults write com.apple.TextEdit "TabWidth" '2' | |
# Turn off automatic double dash into em dash substitution | |
defaults write -g NSAutomaticDashSubstitutionEnabled 0 | |
# Turn off smart quotes | |
defaults write -g NSAutomaticQuoteSubstitutionEnabled 0 |
This file contains 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
gem: --no-rdoc --no-ri |
This file contains 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
# .railsrc | |
-B #Skip Bundle | |
-T #Skip Test-Unit | |
-d postgresql #Use postgres |
This file contains 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
[core] | |
# Excludesfiles allows us to set a global list of things to ignore | |
excludesfile = ~/.gitignore_global | |
# These are custom color options for the console | |
[color] | |
status = auto | |
diff = auto | |
[color "status"] |
This file contains 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
# echo is like puts for bash (bash is the program running in your terminal) | |
echo "Loading ~/.bash_profile a shell script that runs in every new terminal you open" | |
# $VARIABLE will render before the rest of the command is executed | |
echo "Logged in as $USER at $(hostname)" | |
# Load RVM into a shell session *as a function* | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" | |
# Path for RVM | |
test -d $HOME/.rvm/bin && PATH=$PATH:$HOME/.rvm/bin |
This file contains 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
## Problem statement: | |
# Building meaningful relationships is a delicate balance. When hustlers have too many relationships they can get burned out. When they have too little, they are ineffective at achieving meaningful outcomes. When they hustle the right amount, they are successful at achieving their goals and in recruiting others to do the same. | |
# Hustle wants help modeling these relationship interactions using a two-dimensional grid of cells, each of which is in one of two possible states, hustling or not-hustling. | |
# Hustlers interact with people around them, the cells that are horizontally, vertically, or diagonally adjacent to them in the the following ways: | |
# Any hustler with fewer than two hustling neighbors gives up and stops hustling. There were not enough relationships to achieve their goals. | |
# Any hustler with two or three hustling neighbors keeps on hustling. | |
# Any hustler with more than three hustling neighbors stops hustling. | |
# Any non-hustler with exactly three hustling neighbours becomes a hu |
This file contains 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
# Write a function that takes a string as input and reverse only the vowels of a string. | |
# | |
# Example 1: | |
# Given s = "hello", return "holle". | |
# | |
# Example 2: | |
# Given s = "leetcode", return "leotcede". | |
# | |
# Note: | |
# The vowels does not include the letter "y". |
This file contains 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
# SP: Find the length of the longest subarray within an array which has consecutive, increasing numbers. | |
# Example input: [1,2,3,5] | |
# Example output: 3 | |
# Example input: [44, 11, 12, 9] | |
# Example output: 2 | |
################################### |