$ 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
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
]# 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"; |
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/sh | |
ls Postman*.tar.gz > /dev/null 2>&1 | |
if [ $? -eq 0 ]; then | |
echo "Removing old Postman tarballs" | |
rm -f $(ls Postman*.tar.gz) | |
fi | |
echo "Downloading latest Postman tarball" | |
curlExists=$(command -v curl) |
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
[root@xen-R9-dev49-0 env]# cat vm_backupexport.sh | |
#!/bin/bash | |
eval array=($(xe vm-list params=uuid is-control-domain=false|grep "uuid"|cut -c 17-)) | |
for uuid in "${array[@]}"; do | |
vm_name=$(xe vm-list params=name-label uuid=$uuid|grep "name-label"|cut -c 23-) | |
echo "xe vm-export vm='"$uuid"' filename="$vm_name".xva" | |
#xe vm-export vm=$uuid filename=$vm_name.xva | |
done | |
[root@xen-R9-dev49-0 env]# | |
[root@xen-R9-dev49-0 env]# cat vm_details.sh |
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
Type arrows by copy/pasting the following Unicode characters: | |
arrows ↑ ↓ ← → | |
diagonal arrows ↖ ↗ ↘ ↙ | |
The keyboard HTML entity character codes are: ↑ ↓ ← → | |
HTML entities for mdash and ndash (for long dashes): — – | |
HTML entities for less than and greater than characters: < > |
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
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/device_naming.html | |
https://docs.aws.amazon.com/en_pv/AWSEC2/latest/UserGuide/recognize-expanded-volume-linux.html | |
disk Type: | |
Nitro-based Instance:/dev/nvme[0-26]n1[p1...]->(0-26 Disk Number,[p1...] is Partition Number) | |
Identifying the File System for a Volume: | |
[ec2-user ~]$ df -T | |
Filesystem Type 1K-blocks Used Available Use% Mounted on | |
devtmpfs devtmpfs 1878928 0 1878928 0% /dev |
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
Xmllint | |
$ sudo apt install libxml2-utils | |
$ sudo yum install libxml2-utils | |
$ xmllint --format data | |
Xml_pp: | |
$ sudo apt install libxml2-utils | |
$ sudo yum install libxml2-utils | |
$ xmllint --format data |
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
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
installing python 2.6 in RHEL7: | |
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
# Install fpm | |
yum install ruby-devel gcc make rpm-build rubygems | |
gem install --no-ri --no-rdoc fpm | |
# Install prerequisite to compile Python | |
yum groupinstall "Development tools" | |
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel |