- AWS EC2 t2.micro
- CentOS Linux release 7.0.1406 (Core)
- PHP 5.6.11
- MySQL 5.6
- Laravel Framework version 5.1.7 (LTS)
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 | |
profiles=( | |
<profile names in ~/.aws/credentials> | |
) | |
for profile in ${profiles[@]}; do | |
awsume $profile --session-name "kenzo.tanaka" --output-profile tmp > /dev/null 2>&1 | |
account_id=$(aws sts get-caller-identity --profile tmp --query 'Account' --output text) | |
if [ -z "$account_id" ]; then |
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
# see "man logrotate" for details | |
# rotate log files weekly | |
weekly | |
# keep 4 weeks worth of backlogs | |
rotate 4 | |
# create new (empty) log files after rotating old ones | |
create |
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
aws ec2 describe-instances --query 'Reservations[*].Instances[*].Tags[?Key == `Name`].Value' --output text |
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 -y install gcc gcc-c++ kernel-devel | |
sudo yum -y install python-devel libxslt-devel libffi-devel openssl-devel | |
pip install cryptography |
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
name: Test | |
on: [push] | |
jobs: | |
test: | |
strategy: | |
matrix: | |
go-version: [1.13.x] | |
platform: [macos-latest, windows-latest] | |
runs-on: ${{ matrix.platform }} | |
steps: |
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/sh | |
# [環境] | |
# MacOSX | |
# AVD (Android Virtual Device) から接続させたいデスクトップ上のローカルホストへの接続設定 | |
# | |
# MacOSX上で構築した接続先ローカルホストを `local-pl-t-dev.jp` としています。 | |
# AVDから接続させたい接続先ローカルホスト | |
CONNECT_LOCALHOST="local-pl-t-dev.jp" |
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
user nginx; # nginxのworkerプロセス実行権限のユーザ | |
worker_processes auto; # 動作させるnginxのworkerプロセスの数(通常はCPUのコア数以下に設定) | |
worker_rlimit_nofile 4096; # プロセス毎のファイルディスクリプタ上限数 (worker_connectionsの3〜4倍程度が良い) => "Too many open files"対応 | |
error_log /var/log/nginx/error.log warn; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; |
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
# export private keys | |
gpg --export-secret-keys --armor > gpg-private.keys | |
# import private keys | |
gpg --import gpg-private.keys | |
# export public keys | |
gpg --export --armor > gpg-public.keys | |
# import public keys |
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
$ sw_vers | |
ProductName: Mac OS X | |
ProductVersion: 10.15.6 | |
BuildVersion: 19G2021 | |
``` | |
$ ansible all -m ping | |
FAILED! => {"msg": "to use the 'ssh' connection type with passwords, you must install the sshpass program"} |
NewerOlder