This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cp -r three.js-master/utils/exporters/blender/2.65/scripts/addons/ /Applications/blender.app/Contents/MacOS/2.69/scripts/addons/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'active_merchant' | |
ActiveMerchant::Billing::Base.mode = :test | |
# ActiveMerchant の金額はセント単位の整数でInputするため、日本円の場合は*100しなければならない。 | |
# ¥1,000 | |
amount = 100000 | |
# カードセキュリティコードで使用できるのはCVV2, CVC2, CID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gateway.cancel_recurring(account_id: account_id) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def gon | |
if wrong_gon_request? | |
gon_request = Request.new(env) | |
gon_request.id = request.uuid | |
Thread.current['gon'] = gon_request | |
end | |
Gon | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sudo パスワード設定 | |
sudo passwd | |
# vim 設定 | |
sudo yum -y install vim-enhanced | |
#vim ~/.vimrc | |
# git | |
sudo yum -y install git-core | |
git config --global user.name “u name" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo yum install -y openssl-devel openssl mod_ssl | |
mkdir /usr/local/ssl | |
cd /usr/local/ssl | |
# 乱数ファイル生成 | |
openssl md5 * > rand.dat | |
# 秘密鍵生成 | |
# 作成するときにパスフレーズを聞かれるので、必ずメモっておくこと。 | |
# apache起動するときにこれがないと起動できなくなる。 | |
openssl genrsa -rand rand.dat -des3 2048 > mykey.pem | |
openssl req -new -key mykey.pem -out mycsr.pem |
OlderNewer