Skip to content

Instantly share code, notes, and snippets.

@yoshiya54
yoshiya54 / file0.txt
Last active September 20, 2017 15:34
Amazon Linuxへの接続時のメッセージを非表示にしよう ref: http://qiita.com/yoshiya64/items/bc632744f028e23c1290
# ls -la /etc/motd
lrwxrwxrwx 1 root root 25 5月 10 05:02 2013 /etc/motd -> /var/lib/update-motd/motd
@yoshiya54
yoshiya54 / file0.txt
Last active September 6, 2017 15:23
インフラのUnitテスト観点について ref: http://qiita.com/yoshiya64/items/22792cbcf6e8eb0010a5
プログラムを構成する比較的小さな単位(ユニット)が個々の機能を正しく果たしているかどうかを検証するテスト
@yoshiya54
yoshiya54 / 事前準備
Last active September 4, 2017 13:36
新人インフラエンジニアに伝えたい商用環境手順書作成指南書 ref: http://qiita.com/yoshiya64/items/33b14e39d64dd1a2ba72
id -ユーザ確認
pwd -現在地確認
date -作業実施日確認
uname -n -ログインサーバ確認
mkdir -p /work/os -作業ディレクトリ作成
cp -p /etc/sysctl.conf /work/os/sysctl.conf_${date +"%Y%m%d"} -バックアップ取得
ls -l /work/os/sysctl.conf_${date +"%Y%m%d"} -バックアップ確認
cat /etc/sysctl.conf -作業対象ファイルの中身確認
ls -l /etc/sysctl.conf -作業対象ファイルの権限回りの確認
@yoshiya54
yoshiya54 / file0.txt
Created September 3, 2017 05:08
Deep Security as a service Relayサーバの無効化 ref: http://qiita.com/yoshiya64/items/894da8e6f84b565b4b7d
rpm -e ds_agent
@yoshiya54
yoshiya54 / file0.txt
Last active September 1, 2017 15:02
Deep Security as a service 登録編 ref: http://qiita.com/yoshiya64/items/1d40824be71baf38d4bd
{
"Version":"2012-10-17",
"Statement":[
{
"Sid":"cloudconnector",
"Effect":"Allow",
"Action":[
"ec2:DescribeImages",
"ec2:DescribeInstances",
"ec2:DescribeRegions",
@yoshiya54
yoshiya54 / file0.txt
Last active June 19, 2017 15:07
Vagrantでwebサーバを動かしてハマったこと ref: http://qiita.com/yoshiya64/items/09c94bd70c00bde5335c
rails new [project name]
rails -s
@yoshiya54
yoshiya54 / file0.txt
Created June 10, 2017 17:39
Vagrantのネットワークで躓いた ref: http://qiita.com/yoshiya64/items/62d85f645499bf5b7eb6
[root@localhost ~]# yum install dig
Geladene Plugins: fastestmirror
http://mirror.centos.org/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirror.centos.org; Unbekannter Fehler"
Anderer Spiegelserver wird versucht.
[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
@yoshiya54
yoshiya54 / file0.java
Created January 4, 2017 13:17
配列に代入演算するとnull値が入ってしまう ref: http://qiita.com/yoshiya64/items/dacadee52ca92075a9be
String[] c = new String[4];
c[1] += 3;
System.out.println(c[1]);
double f = 1.5
System.out.printf("%6.5f",f);