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 | |
# Tips for you to register with crontab | |
# | |
# SHELL=/bin/bash | |
# PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin | |
# MAILTO=root | |
# HOME=/ | |
# For details see man 4 crontabs |
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
// 認証用インスタンス | |
var twitter = TwitterWebService.getInstance( | |
'', // 作成したアプリケーションのConsumer Key | |
'' // 作成したアプリケーションのConsumer Secret | |
); | |
// 認証 | |
function authorize() { | |
twitter.authorize(); | |
} |
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
version: 2 | |
jobs: | |
build: | |
docker: | |
- image: vvakame/review:3.1 | |
steps: | |
- checkout | |
- run: | |
name: Build PDF | |
command: ./setup.sh && REVIEW_CONFIG_FILE=$REVIEW_CONFIG_FILE npm run pdf |
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 | |
#chkconfig:2345 84 16 | |
#description:unicorn shell | |
#reference: https://marketing-web.hatenablog.com/entry/unicorn_auto_start | |
. /etc/rc.d/init.d/functions | |
NAME="Unicorn" | |
ROOT_DIR="<INPUT_YOUR_ROOT>" |
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 | |
docker run -i -t -w <container_start_directory> -v <host_mount_directory>:<container_mount_directory> <container_name> /bin/bash |
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 | |
set -eu | |
URL='https://hooks.slack.com/services/xxxxxxx/xxxxxxx/xxxxxxxxxxxxxxxx' | |
CHANNEL=${CHANNEL:-'#alert'} | |
BOTNAME=${BOTNAME:-'monitoring-bot'} | |
MESSAGE=${MESSAGE:-'This message is test.\n for examle...a, b, c'} | |
payload="payload={ |
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
<source> | |
@type tail | |
format multiline | |
format_firstline /^.,/ | |
format1 /^., \[(?<time>[^\.]+).+\][ ]+(?<level>[^ ]+) -- :(?<message>.*)$/ | |
path "log/#{ENV['RAILS_ENV']}.log" | |
pos_file /var/log/td-agent/rails.log.pos | |
time_format %Y-%m-%dT%H:%M:%S | |
tag rails.log | |
</source> |
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
grep 'password is generated' /var/log/mysqld.log | awk -F'root@localhost: ' '{print $2}' |
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
<RoutingRules> | |
<RoutingRule> | |
<Condition> | |
<HttpErrorCodeReturnedEquals>404</HttpErrorCodeReturnedEquals> | |
</Condition> | |
<Redirect> | |
<HostName>blog.vtryo.me</HostName> | |
<ReplaceKeyWith/> | |
<HttpRedirectCode>302</HttpRedirectCode> | |
</Redirect> |
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": "aws_bill", | |
"description": "billing!", | |
"region": "YOUR-REGION", | |
"handler": "lambda_function.lambda_handler", | |
"role": "arn:aws:iam::xxxxxxxxxxx:role/lambda_AwsBill", | |
"timeout": 300, | |
"memory": 128, | |
"variables": | |
{ |