Skip to content

Instantly share code, notes, and snippets.

View lunarxlark's full-sized avatar
⌨️
Working from home

yuta kobayashi lunarxlark

⌨️
Working from home
View GitHub Profile
@lunarxlark
lunarxlark / keybindings.json
Created March 27, 2019 08:48
vscode keybind
[
{
"key": "shift+f7",
"command": "editor.action.diffReview.prev",
"when": "isInDiffEditor"
},
{
"key": "shift+f7",
"command": "-editor.action.diffReview.prev",
"when": "isInDiffEditor"
@lunarxlark
lunarxlark / neco_skills.md
Created January 27, 2019 06:25 — forked from ymmt2005/neco_skills.md
Neco プロジェクトのスキルシート

Neco プロジェクトのスキルチェックシート

Neco は大量の物理サーバーを効率的に管理・運用することを目的とした開発プロジェクトです。 Kubernetes を中心に高度な自律運用の実現を目指しています。

本文書はプロジェクトに参加しているメンバーが身に着けている要素技術を並べたものです。

応募時点ですべてを身に着けている必要はありません。 社内にはチュートリアル資料が多数用意されていますので、必要に応じて学べます。

@lunarxlark
lunarxlark / build.gradle
Created October 2, 2018 09:55
spring boot(gradlew) + flyway
buildscript {
dependencies {
classpath "org.flywaydb.flyway-gradle-plugin:3.2.1"
}
}
apply plugin: 'org.flywaydb.flyway'
flyway {
url='jdbc:mysql://{{cluster-endpoint}}:{{port}}/{{database-name}}'
@lunarxlark
lunarxlark / setaws.sh
Last active October 1, 2018 04:04
awsenv(+Terraform) variables setting
# awsenv
function setaws() {
[[ $# -gt 0 ]] && eval "$(~/.local/bin/awsenv $@)";
export TF_VAR_aws_access_key=${AWS_ACCESS_KEY_ID}
export TF_VAR_aws_secret_key=${AWS_SECRET_ACCESS_KEY}
export TF_VAR_aws_region=${AWS_DEFAULT_REGION}
exec $SHELL -l
}
@lunarxlark
lunarxlark / feeder.opml
Created September 16, 2018 12:07
RSS feed
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Feeder - RSS Feed Reader</title>
</head>
<body>
<outline title="Amazon Blog" text="Amazon Blog">
<outline text="日本語ブログ" title="日本語ブログ" type="rss" xmlUrl="https://aws.amazon.com/jp/new/feed/" htmlUrl="https://aws.amazon.com/jp/new/" rssfr-favicon="https://icons.feeder.co/amazon.com"/>
<outline text="Info RDS update" title="Info RDS update" type="rss" xmlUrl="https://forums.aws.amazon.com/rss/rssmessages.jspa?forumID=60" htmlUrl="https://forums.aws.amazon.com" rssfr-favicon="https://icons.feeder.co/amazon.com"/>
<outline text="Amazon Web Services ブログ" title="Amazon Web Services ブログ" type="rss" xmlUrl="https://aws.amazon.com/jp/blogs/news/feed" htmlUrl="https://aws.amazon.com/jp/blogs/news/" rssfr-favicon="https://icons.feeder.co/amazon.com" rssfr-updateInterval="600000"/>
@lunarxlark
lunarxlark / ssm-peco.sh
Last active April 8, 2019 16:29
pecoってAWS System Manager Session ManagerでEC2にアクセスする ref: https://qiita.com/lunarxlark/items/8983b7650f277b71ffba
#!/bin/bash
# Tags.Name取得
export NAME_SSM2EC2=$(aws ec2 describe-instances \
--query "Reservations[].Instances[].Tags[?contains(Key, \`Name\`)].Value[]" | \
sed -e 's/[]" ,\[]//g' | \
sed -e "/^$/d" | peco)
# instance-id取得
export ID_SSM2EC2=$(aws ec2 describe-instances --query "Reservations[].Instances[?contains(Tags[].Value, \`${NAME_SSM2EC2}\`)].InstanceId[]" | sed -e 's/[]" ,\[]//g' | sed -e '/^$/d')
@lunarxlark
lunarxlark / bashrc
Last active June 21, 2022 07:53
可愛いprompt
if [ -e "~/git-completion.bash" ];then
source ~/git-completion.bash
fi
if [ -e "~/git-prompt.sh" ];then
source ~/git-prompt.sh
fi
PS1="\[\e[1;36m\]\u\[\e[0m\]"
PS1+="\[\e[1;31m\]@\[\e[0m\]"
GARBAGE=`docker images | grep "^$IMG " | awk '{ print $3 }'`
for CONTAINER in $GARBAGE
do
docker ps -a | grep $CONTAINER | awk '{ print $1 }' | xargs docker rm
done