This gist is a collection of my rough notes from Strange Loop 2012.
In the seemlingly endless search for the actual correct and easy way to deploy a Rails app, we have tried several ways. We tried out using Apache2 and running a cluster of Thin servers. With the built in threading of Puma we decided to use it with Nginx.
- Create new server
- Login to new server
- ssh root@IPaddress (you can also use the domain name if you have the DNS setup already)
- accept the RSA key
This list has been superseded by Public APIs. Check there for APIs with Auth: No
, HTTPS
and CORS
Yes
.
List of data APIs that require no server-side auth or private credentials, and are thus good for small browser-only JS projects.
- 3taps (information)
- Adobe Creative SDK (image editing)
- App.net
- Bing Maps
gifify() { | |
if [[ -n "$1" ]]; then | |
if [[ $2 == '--good' ]]; then | |
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png | |
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif | |
rm out-static*.png | |
else | |
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif | |
fi | |
else |
Updated for Rails 4.0.0+
-
Set up the
bower
gem. -
Follow the Bower instructions and list your dependencies in your
bower.json
, e.g.// bower.json
{
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
NOTE: This post now lives (and kept up to date) on my blog: http://hakunin.com/rails3-load-paths
Do nothing. All files in this dir are eager loaded in production and lazy loaded in development by default.
tables = [] # or ActiveRecord::Base.connection.tables | |
collation = "utf8_unicode_ci" | |
char_set = "utf8" | |
db = "your_database_name" | |
# write out | |
puts "USE #{db};" | |
puts "ALTER DATABASE #{db} CHARACTER SET #{char_set} COLLATE #{collation};" | |
tables.each do |t| | |
puts "ALTER TABLE #{t} CHARACTER SET #{char_set} COLLATE #{collation};" # changes for new records | |
puts "ALTER TABLE #{t} CONVERT TO CHARACTER SET #{char_set} COLLATE #{collation};" # migrates old records |