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
# ==== Emojis ==== | |
# 🐛 :bug: バグ修正 | |
# 👍 :+1: 機能改善 | |
# ✨ :sparkles: 部分的な機能追加 | |
# 🎉 :tada: 盛大に祝うべき大きな機能追加 | |
# ♻️ :recycle: リファクタリング | |
# 🚿 :shower: 不要な機能・使われなくなった機能の削除 | |
# 💚 :green_heart: テストやCIの修正・改善 |
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 "openssl" | |
pem = DATA.read | |
begin | |
OpenSSL::X509::Certificate.new(pem) | |
puts "Valid!" | |
rescue | |
puts "Invalid!" | |
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
#!/usr/bin/env ruby | |
# | |
# Usage: | |
# ruby sleep_server.rb [options] | |
# | |
# Options: | |
# -p port (default: 80) | |
# -b bind_address (default: 0.0.0.0) | |
# -s sleep_seconds (default: 5) |
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 SomeClass | |
def greet | |
"Hello." | |
end | |
end | |
describe "allow_any_instance_of" do | |
before { allow_any_instance_of(SomeClass).to receive(:greet).and_call_original } | |
context "when calling Command#greet" do | |
it "pass the test" do |
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
yum install -y httpd mariadb-server mariadb-devel php-mysql php php-gd php-mbstring | |
curl -O https://ja.wordpress.org/wordpress-4.1.1-ja.tar.gz | |
tar zxf wordpress-4.1.1-ja.tar.gz -C /var/www/html | |
chown -R apache. /var/www/html/wordpress | |
systemctl start httpd | |
systemctl start mariadb | |
mysql -uroot -e 'create database wordpress' |
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
#!/usr/bin/bash | |
set -eux | |
sudo yum install -y gcc openssl-devel libyaml-devel libffi-devel readline-devel zlib-devel gdbm-devel ncurses-devel | |
git clone https://github.com/riywo/anyenv ~/.anyenv | |
echo 'export PATH="$HOME/.anyenv/bin:$PATH"' >> ~/.bashrc | |
echo 'eval "$(anyenv init -)"' >> ~/.bashrc | |
source ~/.bashrc | |
mkdir ~/.anyenv/plugins | |
git clone https://github.com/znz/anyenv-update.git ~/.anyenv/plugins/anyenv-update |
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
#!/bin/bash | |
set -eux | |
yum install -y gcc openssl-devel libyaml-devel libffi-devel readline-devel zlib-devel gdbm-devel ncurses-devel | |
git clone https://github.com/sstephenson/rbenv.git /usr/local/rbenv | |
git clone https://github.com/sstephenson/ruby-build.git /usr/local/rbenv/plugins/ruby-build | |
cat <<EOF > /etc/profile.d/rbenv.sh | |
export RBENV_ROOT="/usr/local/rbenv" | |
export PATH="\${RBENV_ROOT}/bin:\${PATH}" |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
PXC_CLUSTER_SIZE = 3 | |
IP = "10.6.3.%d" | |
Vagrant.configure(2) do |config| | |
config.vm.box = "centos7" | |
config.vm.box_url = "https://f0fff3908f081cb6461b407be80daf97f07ac418.googledrive.com/host/0BwtuV7VyVTSkUG1PM3pCeDJ4dVE/centos7.box" | |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "cent65" | |
config.vm.network "public_network", ip: "192.168.0.31", bridge: "Qualcomm Atheros AR8161/8165 PCI-E Gigabit Ethernet Controller (NDIS 6.20)" | |
config.vm.provider "virtualbox" do |vb| |
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
StartServers 500 | |
MaxClients 500 | |
MinSpareServers 500 | |
MaxSpareServers 500 | |
ServerLimit 500 | |
MaxRequestsPerChild 0 |