This file contains hidden or 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
#!/usr/bin/env ruby | |
require 'aws-sdk' | |
require 'optparse' | |
require 'yaml' | |
require 'json' | |
begin | |
require 'aws/profile_parser' | |
rescue LoadError; end |
This file contains hidden or 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
# scala install | |
wget www.scala-lang.org/files/archive/scala-2.11.7.deb | |
sudo dpkg -i scala-2.11.7.deb | |
# sbt installation | |
echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 642AC823 | |
sudo apt-get update | |
sudo apt-get install sbt |
This file contains hidden or 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
// slackのwebhook URL | |
var postUrl = "https://hooks.slack.com/services/xxxxxxxxxxx"; | |
// 通知したいslackのチャネル(部屋) | |
var postChannel = "#n_app_review"; | |
// 抽出元のGmailのラベル | |
var checkLabel = "TO_ME"; | |
function myFunction() { |
This file contains hidden or 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
// You will also need to create a gmail filter to add the 'send-to-slack' label | |
// to any emails you want sent to slack | |
function sendEmailsToSlack() { | |
var label = GmailApp.getUserLabelByName('send-to-slack'); | |
var messages = []; | |
var threads = label.getThreads(); | |
for (var i = 0; i < threads.length; i++) { | |
messages = messages.concat(threads[i].getMessages()) |
This file contains hidden or 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
Mount Separately | |
---------------- | |
# mount nvme SSDs to /dataN when available for specific instance types | |
# There are only 4 nvme slots in r5 instances. /dev/nvme0n1 is root EBS volume. | |
for i in $(seq 1 4); do | |
if [ -e "/dev/nvme${i}n1" ] | |
then | |
echo "Mounting /dev/nvme${i}n1 to /data${i}" | |
sudo mkfs.ext4 -E nodiscard /dev/nvme${i}n1 | |
sudo mkdir -p /data${i} |