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
// something | |
// jenkins | |
import groovy.json.* | |
ext { | |
jenkinsUrl = 'http://localhost:8080' | |
buildNumber = System.getenv("BUILD_NUMBER"); | |
jobName = System.getenv("JOB_NAME"); | |
println "build number is ${buildNumber}" |
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
@Grapes([ | |
@Grab(group='commons-codec', module='commons-codec', version='1.10'), | |
@Grab(group='com.amazonaws', module='aws-java-sdk', version='1.9.13') | |
]) | |
import com.amazonaws.services.ec2.* | |
import com.amazonaws.auth.* | |
import com.amazonaws.auth.profile.* | |
import com.amazonaws.regions.* |
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
#/bin/bash | |
expect -c" | |
set timeout 20 | |
spawn bundle exec rake | |
expect password: | |
send \"${LOGIN_PASSWORD}\n\" | |
interact |
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
# Dockerfile | |
FROM centos:6.6 | |
MAINTAINER test | |
RUN yum -y update | |
# install package | |
RUN yum -y install passwd openssh openssh-server openssh-clients sudo python |
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
aws ses get-send-quota | jq '.SentLast24Hours / .Max24HourSend * 100' |
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
ls /path/to/ | sed -e "s/.\{13\}$//" |uniq |
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
aws ec2 run-instances --image-id ami-hogefuga |jq '.Instances[].InstanceId' |
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
cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime |
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
aws ec2 describe-instances --filter "Name=instance-state-name,Values=running" | jq '.Reservations[].Instances[].InstanceId' | |
# filter tag name | |
aws ec2 describe-instances --filter "Name=tag-key,Values=Name" "Name=tag-value,Values=dev-hoge" | jq '.Reservations[].Instances[].InstanceId' | |
# or | |
aws ec2 describe-instances --filter "Name=tag-key,Values=Name" "Name=tag-value,Values=dev-hoge,verification-hoge" | jq '.Reservations[].Instances[].InstanceId' | |
# get name in Tags | |
aws ec2 describe-instances --filter "Name=tag-key,Values=Group" "Name=tag-value,Values=hoge-fuga" | jq '.Reservations[].Instances[].Tags[] | select(.Key == "Name") | .Value' |
OlderNewer