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
# Monkey patch ruby Object with try method. | |
# Inspiration Rails. | |
# http://api.rubyonrails.org/classes/Object.html#method-i-try | |
class Object | |
def try(*a, &b) | |
if a.empty? && block_given? | |
yield self | |
else | |
publice_send(*a, &b) if respond_to?(a.first) | |
end |
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
### Keybase proof | |
I hereby claim: | |
* I am jamuc on github. | |
* I am jamuc (https://keybase.io/jamuc) on keybase. | |
* I have a public key whose fingerprint is 8905 1D0D 7154 35C9 5620 8A66 C025 90C2 3A46 1BDD | |
To claim this, I am signing this object: |
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
git checkout MINE | |
git merge --no-commit -s ours HERS | |
git rm -rf . | |
git checkout HERS -- . |
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
find . -name "*.html.erb" -print0 | xargs -0 -n 1 sed -i -e 's/@controller.is_in_demo_mode/@demo/g' |