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 | |
# post_estimated_charges.sh | |
# Post AWS/Billing EstimatedCharges to Slack. | |
channel=$1 | |
aws cloudwatch get-metric-statistics \ | |
--namespace AWS/Billing \ | |
--metric-name EstimatedCharges \ | |
--start-time `date "+%Y-%m-%dT00:00:00Z" -d "2 days ago"` \ | |
--end-time `date "+%Y-%m-%dT00:00:00Z"` \ |
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
// | |
// re-authenticate_line_developer.gs | |
// | |
// Extend the expiration date of the LINE developer by accessing URL of a notification mail. | |
// | |
// @author tearoom6 2016/12/15- | |
// | |
var SLACK_POST_URL = 'https://hooks.slack.com/services/xxxxxx/xxxxxxxxxxxxxxxxxxxx'; | |
var SLACK_NOTIFY_CHANNEL = '#general'; |
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
/* | |
* reserve_its_kenpo.js | |
* ITS健保施設予約 | |
* @tearoom6 | |
* | |
* usage) | |
* phantomjs reserve_its_kenpo.js command [args] | |
*/ | |
// global variables |
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
function try() { | |
if type $1 2>/dev/null 1>/dev/null; then | |
eval $@ | |
fi | |
} |
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
// | |
// post_to_slack.gs | |
// | |
// Monitor specified labeled mails and post to Slack. | |
// | |
// @author tearoom6 2015/12/24- | |
// | |
var SLACK_POST_URL = 'https://hooks.slack.com/services/xxxx/xxxx'; | |
var TARGETS = [ |
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
history | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head |