Paperclip: Image resize options

Posted About 13 years ago by Ulrich Berkmueller.
imagemagick.org

Paperclip uses the imagemagick resize options like 100x50> , 100x50<, 100x50# etc to resize images. See the link what options are...

Linux: rename or change extension of multiple files

Posted About 13 years ago by Arne Hartherz.

When you need to bulk rename files you can not call "mv *.foo *.bar" to change the extension of all...

Speed up file downloads with Rails, Apache and X-Sendfile

Posted About 13 years ago by Henning Koch.

When you use the send_file method to send a local file to the browser, you can save resources on...

Generate a strong secret from the shell

Posted Over 13 years ago by Henning Koch.

A good tool to generate strong passwords and secrets is "apg". You can get it with sudo apt-get install...

Install the Paperclip gem on Ubuntu servers

Posted Over 13 years ago by Tobias Kraze.

You need to install the following packages before you can build the Paperclip gem: sudo apt-get install imagemagick librmagick...

Copying validation errors from one attribute to another

Posted Over 13 years ago by Henning Koch.

When using virtual attributes, the attached trait can be useful to automatically copy errors from one attribute to another.

Deliver Paperclip attachments to authorized users only

Posted Over 13 years ago by Henning Koch.

When Paperclip attachments should only be downloadable for selected users, there are three ways to go. The same applies to...

Use the new Google Images as a German user

Posted Over 13 years ago.
images.google.com

In july Google announced a new version of their image serach tool Google Images. But you won't find it...

jQuery Captify (v1.1.3) / Simple Animated Image Captions

Posted Over 13 years ago by Lexy.
thirdroute.com

Captify is a plugin for jQuery written by Brian Reavis (@brianreavis) to display simple, pretty image captions that appear on...

Make box shadows look the same in IE and other browsers

Posted Over 13 years ago by Henning Koch.

The box shadows created rendered in IE by CSS3PIE look darker and are blurred differently than in browsers that render...

Recursively remove unnecessary executable-flags

Posted Over 13 years ago by Arne Hartherz.

Sometimes files attain executable-flags that they do not need, e.g. when your Windows VM copies them over a Samba...

Vadikom » Poshy Tip - jQuery Plugin for Stylish Tooltips

Posted Over 13 years ago by Lexy.
vadikom.com

With this plugin, you can create a scalable tooltip by just using a single background image for the tooltip body...

Regular Expressions - Cheat Sheet

Posted Over 13 years ago.
regular-expressions.info

You can write regular expressions some different ways, e.g. /regex/ and %r{regex}. For examples, look here. Remember that it...

Change Paperclip secrets the hard way

Posted Over 13 years ago by Henning Koch.

So you screwed up and copied Paperclip secrets from one project to another. Here is a semi-automatic, painful way...

Change the color of a <hr> in all browsers

Posted Over 13 years ago by Henning Koch.

The following Sass will do it: hr color: #ddd background-color: #ddd border: none height: 1px

mezzoblue's PaintbrushJS at master - GitHub

Posted Over 13 years ago by Lexy.
github.com

PaintbrushJS is a lightweight, browser-based image processing library that can apply various visual filters to images within a web...

Only allow pictures as Paperclip attachments

Posted Over 13 years ago by Tobias Kraze.

validates_attachment_content_type :image, :content_type => /^image\/(jpg|jpeg|pjpeg|png|x-png|gif)$/, :message => 'file type is not...

Fix PNG colors in IE, old Safaris and new Firefoxes

Posted Over 13 years ago by Arne Hartherz.
morris-photographics.com

Some browsers render PNG images with color profiles and other shenanigans, some don't. The cleanest way to have consistent...

Reprocess only missing images with Paperclip

Posted Over 13 years ago by Tobias Kraze.

When a paperclip attachment gains a new style and you have many attachments, reprocessing can take ages. This is because...

Convert colorspace of images attached with Paperclip

Posted Over 13 years ago.

has_attached_file( :avatar, :styles => { :large => "300x300", :small => "100x100" }, :convert_options => { all => "-colorspace RGB" } )

Reprocess Paperclip attachments in one line

Posted Over 13 years ago.

script/runner -e development 'Article.all.each { |a| a.image.reprocess! if a.image.exists? }; "done"'

Basic styles for flash notifications

Posted Over 13 years ago.

.error, .information, .warning { font-weight: bold; } .notice { color: #11bb00; } .error { color: #F53A31; } .information { color: #557; } .warning { color: #d07d2d; }

Configuring Git with .gitconfig

Posted Over 13 years ago by Dominik Schöler.

Basic configuration Please keep this config simple. It should be a starting point for new developers learning Git. [user]

Index of /projects/sleight

Posted About 15 years ago by Lexy.
youngpup.net

PNG transparency for IE 6.