I hereby claim:
- I am renaudhager on github.
- I am renaudhager (https://keybase.io/renaudhager) on keybase.
- I have a public key whose fingerprint is 7024 8C68 150D 3CC6 D2C8 797E BE05 C5F1 CA6F 0B3F
To claim this, I am signing this object:
us-east-2 | |
us-east-1 | |
us-west-1 | |
us-west-2 | |
ap-east-1 | |
ap-south-1 | |
ap-northeast-2 | |
ap-southeast-1 | |
ap-southeast-2 | |
ap-northeast-1 |
#!/bin/bash | |
for region in `cat ~/Documents/work/tmp/aws-region-list.txt` | |
do | |
for profile in `cat ~/Documents/work/tmp/aws-profiles-list.txt` | |
do nb=$(aws ec2 describe-instances --region=${region} --profil=$profile | jq | grep -c InstanceId) | |
echo "${region}-1,$profile,$nb" | tee ~/Documents/work/tmp/aws-list-instances.csv | |
done | |
done |
I hereby claim:
To claim this, I am signing this object:
import jenkins.model.* | |
import hudson.security.* | |
def instance = Jenkins.getInstance() | |
def hudsonRealm = new HudsonPrivateSecurityRealm(false) | |
hudsonRealm.createAccount("admin","admin") | |
instance.setSecurityRealm(hudsonRealm) | |
def strategy = new GlobalMatrixAuthorizationStrategy() |
#!/usr/bin/python | |
# Usage : | |
# aws ec2 describe-instances --filter="Name=instance-state-name,Values=running" | aws-instances-lookup <tag name> <tag value> | |
import sys | |
import json | |
def get_tag(instance, tag_key): | |
for tag in instance['Tags']: |
#!/usr/bin/python | |
# Usage : | |
# aws ec2 describe-tags | python search_tags.py <tag name> <tag value> | |
import sys | |
import json | |
tag_key = sys.argv[1] | |
tag_value = sys.argv[2] |
import os | |
path = os.getcwd() | |
directory_1_level = os.listdir(path) | |
for directory in directory_1_level: | |
if os.path.isdir(directory): | |
filenames = os.listdir(directory) |
# List all tags from the current instance | |
aws ec2 describe-tags --filters "Name=resource-id,Values=$(curl -s http://169.254.169.254/latest/meta-data/instance-id)" | |
# Print value of specific tag | |
aws ec2 describe-tags --filters "Name=resource-id,Values=$(curl -s http://169.254.169.254/latest/meta-data/instance-id)" \ | |
| jq '.Tags[] | select(.Key == "Owner" ) | .Value' | |
# Get the current region. | |
export AWS_DEFAULT_REGION=`curl -s http://169.254.169.254/latest/dynamic/instance-identity/document | jq '.region' | tr -d \"` |
curl -s -X GET http://localhost:8080/v3/nodes --data-urlencode 'query=["and",["=", ["fact", "nap_base_system_role"], "jiradb"],["=", ["fact", "nap_base_system_env"], "dev"]]' | |
curl -s -X GET http://localhost:8080/v3/nodes --data-urlencode query@myfile | |
Content of myfile: | |
["and", | |
["=", ["fact", "nap_base_system_role"], "jiradb"], | |
["=", ["fact", "nap_base_system_env"], "dev"] | |
] |
yum list installed | tr "\n" "#" | sed -e 's/# / /g' | tr "#" "\n" | grep blabla |