Skip to content

Instantly share code, notes, and snippets.

@iCreateJB
iCreateJB / rails http status codes
Created May 18, 2016 00:40 — forked from mlanett/rails http status codes
HTTP status code symbols for Rails
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
@iCreateJB
iCreateJB / thumbnail.rb
Last active December 13, 2015 21:48 — forked from anonymous/thumbnail.rb
# 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!