$ aws pricing describe-services \
--region us-east-1 \
| jq -r '.Services[] | select (.ServiceCode=="AmazonEC2") | .AttributeNames[]' \
| sort
LeaseContractLength
OfferingClass
PurchaseOption
capacitystatus
clockSpeed
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
example : | |
#yumdownloader --source python-psycopg2-2.5.1-3.amzn2.0.2 | |
yum -y install wget bash-completion bash-completion-extras vim screen sysstat chrony | |
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
ssh-keygen authentication key generation, management and conversion | |
Generate an RSA SSH keypair with a 4096 bit private key | |
$ ssh-keygen -t rsa -b 4096 -C "RSA 4096 bit Keys" | |
Generate an DSA SSH keypair with a 2048 bit private key | |
$ ssh-keygen -t dsa -b 1024 -C "DSA 1024 bit Keys" | |
Generate an ECDSA SSH keypair with a 521 bit private key | |
$ ssh-keygen -t ecdsa -b 521 -C "ECDSA 521 bit Keys" | |
Generate an ed25519 SSH keypair- this is a new algorithm added in OpenSSH. | |
$ ssh-keygen -t ed25519 | |
Extracting the public key from an RSA keypair |
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
sudo alien --scripts jdk-8u144-linux-x64.rpm | |
sudo alien --scripts jdk-1.7.0_04-fcs.x86_64.rpm | |
sudo dpkg -i jdk-8u144-linux-x64.rpm | |
sudo dpkg -i jdk1.8.0-144_1.8.0144-1_amd64.deb | |
vadiraj@DevOps:~$ cat /etc/profile.d/jdk.sh | |
#!/bin/bash | |
unset JAVA_HOME | |
unset JRE_HOME | |
export PATH=$(echo $PATH | tr -s ":" "\n" | grep -v java| tr -s "\n" ":") | |
export PATH=$(echo $PATH | tr -s ":" "\n" | grep -v jvm| tr -s "\n" ":") |
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
[root@elasticsearch]# grep -v "^#\|^$" /etc/security/limits.conf | |
* soft nofile 100000 | |
* hard nofile 100000 | |
* soft sigpending 1032252 | |
* hard sigpending 1032252 | |
* soft memlock unlimited | |
* hard memlock unlimited | |
* soft stack unlimited | |
* hard stack unlimited | |
* soft nproc unlimited |
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
FILE SPACING: | |
# double space a file | |
sed G | |
# double space a file which already has blank lines in it. Output file | |
# should contain no more than one blank line between lines of text. | |
sed '/^$/d;G' |
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
sudo yum makecache | |
sudo yum update | |
sudo yum install epel-release | |
sudo yum makecache | |
sudo yum install python-pip | |
sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(rpm -E '%{rhel}').noarch.rpm | |
sudo yum install https://$(rpm -E '%{?centos:centos}%{!?centos:rhel}%{rhel}').iuscommunity.org/ius-release.rpm | |
sudo yum makecache | |
sudo yum install yum-plugin-replace | |
sudo yum repolist |
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
$ cat /scripts/graphit_test.sh | |
#!/bin/bash | |
#benchmark.statsdtest.random.histograms:${RANDOM} ${epoch}\n \ | |
#benchmark.statsdtest.random.meters:${RANDOM} ${epoch}\n \ | |
#benchmark.statsdtest.random.sets:${RANDOM} ${epoch}\n \ | |
epoch=$(date +%s) | |
which node || { echo "node missing"; exit 2; } | |
[ -z "$1" ] && { echo "GRAPHITE_SERVER details missing"; exit 2; } | |
GRAPHITE_SERVER=$1 | |
GRAPHITE_CARBON_PORT=2003 |
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
]# cat zook.sh | |
epoch=$(date +%s) | |
for zn in $(zookeepercli --servers zook1,zook2,zook3 -c lsr /); do echo "Znode:$zn" && zookeepercli --servers zook1,zook2,zook3 -c get /$zn ; done | sed '/^$/d' > /tmp/z-$epoch.txt 2>&1 | |
cat /tmp/z-$epoch.txt | |
]# cat create_topic.sh | |
/opt/kafka/bin/kafka-topics.sh --delete --zookeeper zook1:2181,zook2:2181,zook3:2181 --topic etopic01 | |
/opt/kafka/bin/kafka-topics.sh --create --zookeeper zook1:2181,zook2:2181,zook3:2181 --replication-factor 1 --partitions 2 --topic etopic01 | |
/opt/kafka/bin/kafka-topics.sh --list --zookeeper zook1:2181,zook2:2181,zook3:2181 | |
/opt/kafka/bin/kafka-configs.sh --alter --zookeeper zook1:2181,zook2:2181,zook3:2181 --entity-type topics --entity-name etopic01 --add-config retention.ms=1000 |
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
]# yum -y install perl-XML-Simple perl-YAML-Syck perl-Data-Dumper | |
]# cat /custom_scripts/xml2yaml.pl | |
#!/usr/bin/perl | |
use XML::Simple; | |
#use Data::Dumper; | |
use YAML::Syck; | |
if( ( not defined $ARGV[0]) or ( $ARGV[0] eq "-h" ) or ( $ARGV[0] eq "--help" ) ) { | |
print "USAGE: perl xml2yaml.pl file.xml > file.yaml\n"; |