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
HTTP status code symbols for Rails | |
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings. | |
Status Code Symbol | |
1xx Informational | |
100 :continue | |
101 :switching_protocols | |
102 :processing |
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
# Create Image Mask ( circle.png ) | |
# convert -size 168x168 xc: -transparent white -fill blue -draw 'circle 84,84 24,24' circle.png | |
# System command. | |
# convert original.image.png -resize '168x168^' -gravity center -crop '168x168+0+0' original.resize.png; | |
# convert -size 168x168 xc: -fill original.resize.png -draw 'circle 85,80 25,25' circle.png | |
# Leaves the image offset but centered. | |
# image = Magick::Image.read('original.image.png').first | |
# image.resize_to_fill(168,168,'center') | |
# image.write 'original.resize.png' | |
# image.destroy! |