Skip to content

Instantly share code, notes, and snippets.

View crystianwendel's full-sized avatar

Crystian Wendel Meneses Leão crystianwendel

  • Roadmaps
  • Recife
View GitHub Profile
@yshmarov
yshmarov / _thumbnail.html.erb
Last active September 22, 2022 19:36
embed Youtube in ActionText
app/views/youtubes/_thumbnail.html.erb
<div>
<%= image_tag youtube.thumbnail_url, style: "max-width:400px" %>
</div>
@micahroberson
micahroberson / estimate.rb
Created July 13, 2013 00:35
Generate and save a pdf to S3 with wicked_pdf and paperclip
# Main reference was lascarides' post at http://stackoverflow.com/questions/14743447/getting-pdf-from-wickedpdf-for-attachment-via-carrierwave
# estimate.rb
# ...
has_attached_file :pdf,
storage: :s3,
s3_credentials: {
access_key_id: ENV['AWS_ACCESS_KEY_ID'],
secret_access_key: ENV['AWS_SECRET_ACCESS_KEY'],
bucket: ENV['AWS_BUCKET']