Skip to content

Instantly share code, notes, and snippets.

View settingsslconf
<VirtualHost _default_:443>
DocumentRoot "/usr/local/rails/sample/public/"
ServerName "sample.com"
RailsMaxPoolSize 7
RailsEnv production
ErrorLog logs/error_log
CustomLog logs/access_log common
<Directory "/usr/local/rails/sample/public/">
AllowOverride all
Options -MultiViews
View gist:c3f40de8f50e5c7e71f5
<VirtualHost _default_:443>
DocumentRoot "/usr/local/rails/shelfy_release/public/"
ServerName "shelfy.jp"
RailsMaxPoolSize 7
RailsEnv production
ErrorLog logs/error_log
CustomLog logs/access_log common
<Directory "/usr/local/rails/shelfy_release/public/">
AllowOverride all
Options -MultiViews
View https
-----BEGIN CERTIFICATE-----
中間証明書の内容
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
クロスルート証明書の内容
View ssl
-----BEGIN CERTIFICATE-----
DIID1TCCAr2gAwIBAgIDAjbRMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVT
MRYwFAYDVQQKES1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9i
YWwgQ0EwHhcNMTAwMjE5MjI0NTA1WhcNMjAwMjE4MjI0NTA1WjA8MQswCQYDVQQG
EwJVUzEXMBUGA1UEChMOR2VvVHJ1c3QsIEluYy4xFDASBgNVBAMTC1JhcGlkU1NM
IENBMIIBIjAMAMRFHVVAPQ/MFAdfsaEFAAOCAQ8AMgKCAQEAx3H4Vsce2cy1rfa0
l6P7oeYLUF9QqjraD/w9KSRDxhApwfxVQHLuverfn7ZB9EhLyG7+T1cSi1v6kt1e
6K3z8Buxe037z/3R5fjj3Of1c3/fAUnPjFbBvTfjW761T4uL8NpPx+PdVUdp3/Jb
ewdPPeWsIcHIHDro5/YfmfsamOlLMAPoar1b96oZU8wD84l6pelaHnnzh8jfyMX8
N8iamte4dsywPfsaf95lTq319SQXhZV63xEtZ/vNWfcNMFbPqjfWdY3SZiHTGSDHl5
View gist:1f560cb75a2535d4a213
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
View ec2 instance initialize
# 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"
View helpers.rb
def gon
if wrong_gon_request?
gon_request = Request.new(env)
gon_request.id = request.uuid
Thread.current['gon'] = gon_request
end
Gon
end
View ActiveMerchant cancel
gateway.cancel_recurring(account_id: account_id)
View ActiveMerchant payed
require 'rubygems'
require 'active_merchant'
ActiveMerchant::Billing::Base.mode = :test
# ActiveMerchant の金額はセント単位の整数でInputするため、日本円の場合は*100しなければならない。
# ¥1,000
amount = 100000
# カードセキュリティコードで使用できるのはCVV2, CVC2, CID
View exporter for blender
cp -r three.js-master/utils/exporters/blender/2.65/scripts/addons/ /Applications/blender.app/Contents/MacOS/2.69/scripts/addons/