Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
sudo /usr/sbin/usermod -s /bin/bash nginx
sudo /sbin/service monit stop
sudo /sbin/service nginx stop
sudo /sbin/service hhvm stop
sudo /usr/sbin/usermod -d /var/www/vhosts nginx
sudo /sbin/service hhvm start
sudo /sbin/service nginx start
#!/bin/bash
# install CodeDeploy agent
sudo yum -y update
sudo yum install -y ruby
sudo yum install -y aws-cli
mkdir -p /tmp/codedeploy_agent
cd /tmp/codedeploy_agent
aws s3 cp s3://aws-codedeploy-us-east-1/latest/install . --region ap-northeast-1
chmod +x ./install
@AtsushiA
AtsushiA / new_gist_file_0
Created November 29, 2015 09:44
wockr command in a shell script
#!/bin/bash
shopt -s expand_aliases
source ~/.bash_profile
#!/bin/bash
## Wocker - http://wckr.github.io
## Sctipt to Switch Container (STOP active Container & START other Container)
## switch.sh [Container Name]
#SET Options
shopt -s expand_aliases
source ~/.bash_profile
## Check Value
aws cloudfront create-distribution --cli-input-json "$(curl -l -s https://raw.githubusercontent.com/amimoto-ami/create-cf-dist-settings/master/source_dist_setting.sh | origin_url='{ORIGIN URL HERE}' origin_domain='{ORIGIN DOMAIN NAME HERE}' sh)"
#!/bin/bash
#Set sqlpassword
MYSQL_PASSSWORD="$(curl http://169.254.169.254/latest/meta-data/instance-id)"
#Set Timezon
cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
sed -i -e "s/ZONE=.*$/ZONE=\"Asia\/Tokyo\"/" /etc/sysconfig/clock
sed -i -e "s/UTC=.*$/UTC=false/" /etc/sysconfig/clock
echo 'ARC=false' >> /etc/sysconfig/clock
# -*- mode: ruby -*-
# # vi: set ft=ruby :
require 'fileutils'
Vagrant.require_version ">= 1.6.0"
# Defaults for config options
$update_channel = "stable"
$vb_gui = false
@AtsushiA
AtsushiA / init.sh
Last active January 31, 2017 07:09
wocker-init-ja
#!/bin/bash
wocker wp core language install ja --activate
wocker wp core update-db
wocker wp option update timezone_string 'Asia/Tokyo'
wocker wp option update date_format 'Y年n月j日'
wocker wp option update time_format 'H:i'
wocker wp plugin update-all
@AtsushiA
AtsushiA / init.sh
Created June 29, 2016 02:42 — forked from shimakyohsuke/init.sh
Wocker でコンテナ立ち上げ後に実効するやつ
#!/bin/bash
shopt -s expand_aliases
source ~/.bash_profile
## 日本語化
wocker wp core language install ja
wocker wp core language activate ja
## いろいろなプラグインをインストール
echo "いろいろなプラグインをインストールしますか? [Y/N]"
cat {LogFileName} | grep Googlebot | cut -f5 | awk '!colname[$1]++{print $1}'