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 | |
#Disable SELINUX | |
setenforce 0 | |
echo "SELINUX=disabled" > /etc/selinux/config | |
echo "SELINUXTYPE=targeted" >> /etc/selinux/config | |
#Disable IPv6 | |
echo "net.ipv6.conf.all.disable_ipv6=1" >> /etc/sysctl.conf | |
echo "net.ipv6.conf.all.accept_redirects=0" >> /etc/sysctl.conf |
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 | |
cd /usr/share/nginx/html/test/assets/img/dest | |
for i in *.jpg; do convert $i -resize 400x350! $(basename $i .jpg).jpg; done | |
for i in *.jpg; do convert $i -strip -quality 85% $(basename $i .jpg).jpg; 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 | |
BUILD_DATE=`date +"%d%b%Y"` | |
TIME=`date +"%H%M"` | |
BUILD_NAME="$1$BUILD_DATE" | |
KEY="ets-poc" | |
PEM_KEY="/home/timski/keyfile.pem" | |
APPDIR="/home/timski" | |
OS="REDHAT_LATEST_64" |
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 | |
PASS=`cat /dev/urandom | tr -dc 'a-zA-Z0-9-_!@#$%^&*()_+{}|:<>?=' | fold -w 32 | head -n 1` | |
while read line; do | |
PASS=`cat /dev/urandom | tr -dc 'a-zA-Z0-9-_!@#$%^&*()_+{}|:<>?=' | fold -w 32 | head -n 1` | |
useradd -d /home/$line $line | |
echo "$PASS" | passwd --stdin $line 1> /dev/null | |
echo "$line ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers |
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
curl -XDELETE http://localhost:9200/* | |
curl -XPOST localhost:9200/aws/dev -d @aws.json | |
curl 'http://localhost:9200/aws/dev/_settings?pretty' | |
curl http://localhost:9200/_aliases?pretty=1 |
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 | |
GREP_OPTIONS="--color=auto" | |
GREP_COLOR="1;32" | |
EDITOR="vim" | |
VISUAL="vim" | |
HISTIGNORE="pwd:ls:more:du:history:find:date:top:grep:mount:umount:which:exit:vi:eject:cat:cd:vim" | |
HISTSIZE="3000" | |
HISTCONTROL="ignoredups" | |
NO_PROXY='127.0.0.1, localhost' |
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 | |
#Remove clients cert by invoking Puppet Master API | |
CERTNAME=`facter fqdn` | |
PUPMASTER='puppet' | |
SSLDIR=`puppet agent --configprint ssldir` | |
curl --noproxy '*' -X DELETE -H "Accept: pson" https://${PUPMASTER}:8140/production/certificate_status/${CERTNAME} --cacert /etc/puppetlabs/puppet/ssl/certs/ca.pem --key /etc/puppetlabs/puppet/ssl/private_keys/${CERTNAME} --cert /etc/puppetlabs/puppet/ssl/certs/${CERTNAME} |
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
variable "aws_region" { | |
default = "us-east-1" | |
} | |
variable "rhelami" { | |
default = { | |
us-east-1 = "ami-436a702a" | |
} | |
} | |
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
#!/usr/bin/python | |
import requests | |
from bs4 import BeautifulSoup | |
import json | |
q = requests.get('http://marshyski.com/man-behind-the-keyboard') | |
def cleanhtml(): | |
return ''.join(BeautifulSoup(q.text).findAll(text=True)).replace(' ', ' ') |
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
#!/usr/bin/python | |
# yum install python-suds | |
import suds | |
import base64 | |
# Uncomment the logging if you want to see the XML input and output for debugging | |
import logging | |
import logging.handlers |
OlderNewer