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
# Find the MD5 sum of the current directory | |
find . -type f -not -path "./.git/*" -print0 | xargs -0 md5 | md5 |
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
# List all the gems and versions used in your rails project | |
bundle show | |
# Use this to list an individual gem's location. Note that the regular "bundle show" doesn't tell you when a dependency is broken | |
bundle show <gem> | |
# Perform "bundle show <gem>" but for all the gems | |
bundle show | sed -e 's/ \* //g' | sed -e 's/ (.*//g' | xargs -I {} bundle show {} | |
# Try using bundle install |
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
# Remove unused gems, clean up broken dependencies | |
# Use with bundle show <gem> to resolve LoadError problems for gems that are installed but not seen by Rails | |
gem clean <gem> | |
# Remove accumulated gem documentation (ri and rdoc) | |
rm -r `gem env gemdir`/doc |
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
solution = 0 | |
(1...1000).each do |n| | |
if n % 3 == 0 or n % 5 == 0 | |
solution += n | |
end | |
end | |
solution |
NewerOlder