Skip to content

Instantly share code, notes, and snippets.

@tkhk
tkhk / rails_new_test_options.md
Created December 23, 2019 07:17
rails new した時の --skip-test と --skip-system-test の違い

rails new した時の --skip-test と --skip-system-test の違い

--skip-test--skip-system-test をそれぞれつける時とつけない時で比較した

$ diff -ru nooption skiptest
$ diff -ru nooption skipsystemtest
@tkhk
tkhk / rails-new.sh
Last active December 23, 2019 05:54
rails new memo
# mysql
# self install webpack
rails new ${RAILS_PROJECT_NAME} \
--database mysql \
--skip-puma \
--skip-action-cable \
--skip-bundle \
--skip-sprockets \
--skip-coffee \
--skip-turbolinks \
@tkhk
tkhk / create_gitlabrunner.yaml
Last active May 16, 2019 05:25
Create gitlab runner on AWS EC2(ubuntu16.04)
AWSTemplateFormatVersion: '2010-09-09'
Description:
GitLab Runner
Parameters:
RunnerToken:
Description: ""
Type: String
VPCID:
package main
import (
"crypto/md5"
"encoding/hex"
"fmt"
)
func main() {
h := md5.New()
#!/bin/bash
if [ $# -ne 1 ]; then
echo "ERROR: Need profile name"
exit 1
fi
profile_name=$1
stack_name=$(aws cloudformation list-stacks --profile ${profile_name} --region ap-northeast-1 \
| jq -r '.StackSummaries[] | .StackName + "\t" + .StackStatus' \
aws ec2 describe-instances | jq -r '.Reservations[].Instances[].Tags[] | select(.Key == "Name") | .Value'
@tkhk
tkhk / td-agent-memo.md
Created February 8, 2019 05:57
td-agent の個人用メモ
@tkhk
tkhk / cfn_except-tag-only-changesets.sh
Created February 5, 2019 03:40
CloudFormation ChangeSet 内の Tags だけの変更を除外する
#!/bin/sh
change_set_arn=arn:aws:cloudformation:ap-northeast-1:xxxxxxxxxxxxxxxxxxxxx
aws cloudformation describe-change-set --change-set-name $change_set_arn | jq '.Changes[].ResourceChange | select(.Scope[] | contains("Tags") | not) | .'
@tkhk
tkhk / cfn_except-tag-only-changesets.sh
Created February 5, 2019 03:40
CloudFormation ChangeSet
#!/bin/sh
change_set_arn=arn:aws:cloudformation:ap-northeast-1:xxxxxxxxxxxxxxxxxxxxx
aws cloudformation describe-change-set --change-set-name $change_set_arn | jq '.Changes[].ResourceChange | select(.Scope[] | contains("Tags") | not) | .'