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
| mkdir ~/Documents/Screenshots | |
| defaults write com.apple.screencapture location ~/Documents/Screenshots/ | |
| killall SystemUIServer |
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
| require "active_support" | |
| require 'fileutils' | |
| def calculate_file_to_write_to(line) | |
| parts = line.strip.split ' ' | |
| if line.include? 'class:' | |
| fname = parts[-2].gsub(',', '') | |
| fname.gsub! '/' | |
| fname = ActiveSupport::Inflector.underscore fname |
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
| # If you use the default table name | |
| PaperTrail::Version.connection.execute(<<-SQL | |
| select k as key, count(*) | |
| from versions v cross join lateral | |
| jsonb_object_keys(v.object_changes) k | |
| group by k order by count(*) desc; | |
| SQL | |
| ).to_a | |
| # If your table name is papertrail_versions |
OlderNewer