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 Tricks. | |
Delete from git all deleted system files: | |
git rm $(git ls-files --deleted) | |
View deleted file: | |
git show HEAD^:path/to/file | |
git show $(git rev-list --max-count=1 --all -- foo)^:foo |
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
# Assuming you had a model like this | |
# | |
# class Post | |
# has_attached_file :image, :path => ":rails_root/public/system/:attachment/:id/:style/:filename" | |
# end | |
namespace :paperclip do | |
desc "Recreate attachments and save them to new destination" | |
task :move_attachments => :environment do |
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 . -type f -printf '%T@ %p\n' | sort -n | tail -1000 | cut -f2- -d" " |
OlderNewer