Skip to content

Instantly share code, notes, and snippets.

:octocat:

adachin0817 RVIRUS0817

:octocat:
Block or report user

Report or block RVIRUS0817

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View lambda_function-general.py
import datetime
import time
import boto3
log_name_general = 'general-log'
log_group_name_general = '/aws/rds/cluster/xxxxx/general'
s3_bucket_name = 'xxxxxxxxxx'
s3_prefix_general = 'xxxx/log/mysql/' + log_name_general + '/%s' % (datetime.date.today().strftime("%Y")) + '/%s' % (datetime.date.today().strftime("%m")) + '/%s' % (datetime.date.today().strftime("%d"))
def get_from_timestamp():
@RVIRUS0817
RVIRUS0817 / sidekiq
Last active Sep 26, 2018
/etc/init.d/ centos/amazonlinux
View sidekiq
#!/bin/sh
# chkconfig: 2345 90 10
# description: sidekiq system status
NAME="sidekiq"
ROOT_DIR="/var/www/sidekiq"
PID="/var/www/sidekiq/tmp/pids/sidekiq.pid"
CONF="/var/www/sidekiq/config/sidekiq.yml"
View ansible-playbook option
-k, --ask-pass
SSH のパスワードを尋ねる(プロンプトが出る)
-K, --ask-sudo-pass
sudo のパスワードを尋ねる(プロンプトが出る)
-C, --check
インストールなどの変更は行わないが、条件の確認などは実行する
-c CONNECTION, --connection=CONNECTION
@RVIRUS0817
RVIRUS0817 / vscode-command
Last active Jan 28, 2019
how to use vscode
View vscode-command
■vscode command
・文字列検索 grep
Command Shift f
・検索 ファイル検索
Command p
・プロジェクトを開く
Command o
@RVIRUS0817
RVIRUS0817 / post_chatwork.sh
Last active Aug 31, 2018
digdag error post
View post_chatwork.sh
#!/bin/sh
if [[ 'prd' == $DIGDAG_ENV ]] ; then
body=$1
room_id=$2
if [ -z $room_id ]; then
room_id=xxxxxxxxxx
fi
@RVIRUS0817
RVIRUS0817 / create-config.sh
Last active Aug 27, 2018
auto make digdag file
View create-config.sh
#!/bin/bash
TABLENAME=$1
COLUMN=$2
SCRIPT_DIR=$(cd $(dirname $0); pwd)
FILEPATH="${SCRIPT_DIR}/../aurora_bigquery"
help() {
echo "
Type:
@RVIRUS0817
RVIRUS0817 / vim.txt
Last active May 21, 2019
vim command memo
View vim.txt
### Vim command
- `があったら削除
:%s/`//g
- 改行削除
:%s/\n//g
- 空白削除
:%s/ //g
View vuls-docker-update.sh
#!/bin/bash
set -e
## Current goval/go-cve-dictionary,Vuls version
echo -e "----Current goval/go-cve-dictionary/gost,Vuls version----"
docker run --rm vuls/go-cve-dictionary -v
docker run --rm vuls/goval-dictionary -v
docker run --rm vuls/gost -v
View git-command.memo
### Git command
# git pull時にマージされたローカルリポジトリを削除
$ git branch --merged | grep -vE '^\*|master$|develop$' | xargs -I % git branch -d %
# リモートブランチをローカルブランチにする
$ git ch -b adachin-develop origin/adachin-develop
# fetchやpullする際に自動的にリモートで削除されているリモートブランチを削除
$ git fetch --prune
View create-old-config_bigquery-to-mysql.sh
#!/bin/bash
#### Past log BigQuery to MySQL(Aurora) ####
set -e
help()
{
echo "
Type:
(例)このように指定してあげましょう! 201805 01 08 FILENAME
You can’t perform that action at this time.