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
| # install gs (Ghostscript) | |
| # install ImageMagick | |
| # add to ~/.bash_profile: | |
| pdf_to_jpg () { | |
| filename=${1:-5} | |
| precision=${2:-1} | |
| convert -density 150 $filename -background white -alpha background -alpha off +adjoin -quality 100 -sharpen 0x1.0 "${filename%.*}-%0${precision}d.jpg" | |
| } |
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
| kill -s sigusr2 `ps -aux | awk '/puma/ {print $2}' | awk 'NR==1'` |
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
| alias get_in_master='git checkout develop && git pull && git checkout master && git pull && git merge --no-edit develop' | |
| alias push_it='git push && git checkout develop' |
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
| Rails.application.eager_load! | |
| data = ActiveRecord::Base.descendants.map{|klass| [klass, klass.reflections.map{|k, v| [v.class.name, k]}] } | |
| data.map{|klass, relations| relations.map{|k, v| "#{klass} #{k.gsub('ActiveRecord::Reflection::', '').gsub('Reflection', '').underscore.humanize.downcase} #{v}"} }.flatten | |
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
| ack TODO app | grep TODO | wc -l; ack TODO lib | grep TODO | wc -l; ack TODO spec | grep TODO | wc -l |
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
| class LegacyInspector | |
| def initialize(should_have_data_newer_than=nil) | |
| @should_have_data_newer_than = should_have_data_newer_than || 6.months.ago | |
| end | |
| def connection | |
| @connection ||= ActiveRecord::Base.connection; | |
| end | |
| def tables |
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
| :e |
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
| object.constructor |
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
| exiftool "-AllDates+=13:2:13 0:0:0" . |
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
| areas = document.getElementsByTagName('textarea') | |
| for (i in areas) { | |
| text = areas[i].innerHTML | |
| if (text !== undefined && text.indexOf('Click to') == -1) { | |
| console.log(text); | |
| } | |
| } |
NewerOlder