- java version: ORACLE jdk1.8.0_171 (use latest stable in 1.8)
- jruby: 9.1.13.0
- tomcat version: 8.5.13 (use latest stable in 8.5)
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
#-------------------------------------------------------------------------------------------------------------- | |
# Add Permanent SWAP 8GB | |
# Create swap file | |
sudo fallocate -l 8G /swapfile | |
#Change Permissions | |
sudo chmod 600 /swapfile | |
#Mark the file as swap space | |
sudo mkswap /swapfile | |
#enable the swap file, allowing our system to start utilizing it | |
sudo swapon /swapfile |
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
# Ignore ansible version check based on tags. Skip tasks with certain tags... | |
ansible-playbook -i /tmp/inv pbook.yml -u ubuntu -b `--skip-tags={{ tag_name_version_check }}` |
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
aws ec2 describe-snapshots --owner-id 194924002687 | jq | |
499 aws ec2 describe-snapshots --owner-id 194924002687 | jq > /tmp/mo-sample.json | |
500 aws ec2 describe-snapshots --owner-id 194924002687 | jq . > /tmp/mo-sample.json | |
501 aws ec2 describe-snapshots --owner-id 194924002687 | jq '.' > /tmp/mo-sample.json | |
502 less /tmp/mo-sample.json | |
503 less /tmp/mo-sample.json | jq '.Snapshots' | |
504 less /tmp/mo-sample.json | jq '.Snapshots | length' | |
505 less /tmp/mo-sample.json | jq '.Snapshots' | less | |
506 less /tmp/mo-sample.json | jq '.' | less | |
507 less /tmp/mo-sample.json | jq '.Snapshots[0]' |
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
#------------------------------------------------------------------------------------------------------ | |
# Copy files using S3 while adding a Key with Date | |
mo@linux-jzir:~> export AWS_DATE=`date +"%Y-%m-%d"` | |
mo@linux-jzir:~> echo $AWS_DATE | |
2018-06-18 | |
mo@linux-jzir:~> aws s3 cp initscript.sh s3://nxlbackup/NAQS/dailycopy/`date +"%Y-%m-%d"`/ --profile s3user | |
#------------------------------------------------------------------------------------------------------ |
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
# Install Google Chrome from powershell - Windows 7, 10 and server 2012 | |
(new-object System.Net.WebClient).DownloadFile('http://dl.google.com/chrome/install/375.126/chrome_installer.exe', 'c:/temp/chrome.exe');. c:/temp/chrome.exe /silent /install;rm c:/temp -rec | |
#-------------------------------------------------------------------------------------------------------------- | |
# EXPORT MetaData.xml USING Windows Powershell ON A ADFS 3.0 SERVER ONTO THE ROOT OF C DRIVE | |
$metaUrl = (Get-ADFSEndpoint | where Protocol -eq "Federation Metadata").FullUrl.ToString() | |
$httpHelper = new-object System.Net.WebClient | |
$metadataAsString = $httpHelper.DownloadString($metaUrl) | |
$httpHelper.DownloadFile($metaUrl , "C:\metadata.xml") |
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
# Jenkins setup to use reverse proxy using nginx to listen on port 80 | |
sudo apt-get install nginx -y | |
sudo rm -rf /etc/nginx/sites-enabled/default | |
# Copy the below configuration to /etc/nginx/sites-available/jenkins | |
# Create a sym link from /etc/nginx/sites-available/jenkins to /etc/nginx/sites-enabled/jenkins | |
# Copy the certificate and ket files to the right folder | |
sudo service jenkins restart | |
sudo service nginx restart |
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 | |
while (sleep 2); do free -m | grep 'Mem:' | perl -pe 'use POSIX strftime; print strftime "[%Y-%m-%d %H:%M:%S] ", localtime' >> /opt/splunkforwarder/cscripts/mylogfile ; done |
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/bash | |
sudo apt-get install libxss1 libappindicator1 libindicator7 | |
sudo apt-get install libxi6 libgconf-2-4 | |
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | |
sudo dpkg -i google-chrome*.deb | |
sudo apt-get install -f | |
sudo apt-get install xvfb | |
sudo apt-get install unzip | |
wget -N http://chromedriver.storage.googleapis.com/2.26/chromedriver_linux64.zip | |
unzip chromedriver_linux64.zip |
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/bash | |
# sudo vim /etc/hosts | |
sudo apt-get install openjdk-8-jre openjdk-8-jre-headless | |
wget https://apt.puppetlabs.com/puppetlabs-release-pc1-xenial.deb | |
sudo dpkg -i puppetlabs-release-pc1-xenial.deb | |
sudo apt-get update -y | |
sudo apt-get install puppetserver -y | |
# sudo vim /etc/default/puppetserver | |
puppet resource service puppetserver enable=true | |
puppet resource service puppetserver ensure=running |
OlderNewer