Skip to content

Instantly share code, notes, and snippets.

@hoshinaoshi
hoshinaoshi / gist:8542943
Created January 21, 2014 16:08
Apache バーチャルホストの設定
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot "/www/example/app_nameA/public"
ServerName "site_A"
RailsMaxPoolSize 7
RailsEnv production
ErrorLog logs/dummy-host.example.com-error_log
CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>
@hoshinaoshi
hoshinaoshi / CarrierWave_auto_orient!
Created November 24, 2013 16:56
How to fix it to appear (image) is rotated uploaded photos in CarrierWave
class ImageUploader < CarrierWave::Uploader::Base
include CarrierWave::RMagick
process :fix_exif_rotation
def fix_exif_rotation
manipulate! do |img|
img.auto_orient!
img = yield(img) if block_given?
img
end
development:
adapter: mysql2
encoding: utf8
reconnect: false
database: db_name
pool: 5
username: user_name
password: pass
host: localhost
socket: /var/lib/mysql/mysql/mysql.sock
innodb_buffer_pool_size=32M
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
symbolic-links=0
character-set-server=utf8
default-time-zone='+9:00'
skip-character-set-client-handshake