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 | |
# Stop all running containers | |
echo "Stopping all running containers..." | |
docker stop $(docker ps -q) | |
# Remove all containers | |
echo "Removing all containers..." | |
docker rm $(docker ps -a -q) |
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
a4b.amazonaws.com | |
access-analyzer.amazonaws.com | |
account.amazonaws.com | |
acm-pca.amazonaws.com | |
acm.amazonaws.com | |
airflow-env.amazonaws.com | |
airflow.amazonaws.com | |
alexa-appkit.amazon.com | |
alexa-connectedhome.amazon.com | |
amazonmq.amazonaws.com |
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
# How to use: | |
# curl -L https://gist.githubusercontent.com/ygorth/7afc92d89badcf81ef47fe8e681c5e9f/raw/4d542337675dc23cf357c6d15458da054af480df/googlebot-load-testing-script | bash -s 20 "http://server.com/api" | |
# This keeps hitting your server at the rate of 20 calls/second until you ask it to stop | |
max="$1" | |
date | |
echo "url: $2 | |
rate: $max calls / second" | |
START=$(date +%s); | |
get () { |
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 install -y epel-release | |
yum install -y python-pip | |
cd /usr/bin | |
pip install pystache | |
pip install argparse | |
pip install python-daemon | |
pip install requests | |
cd /opt |
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
WORKDIR=~/tmp/gdm-login-background | |
GST=/usr/share/gnome-shell/gnome-shell-theme.gresource | |
GSTRES=$(basename $GST) | |
mkdir -p $WORKDIR | |
cd $WORKDIR | |
mkdir theme | |
for r in `gresource list $GST`; do | |
gresource extract $GST $r >$WORKDIR$(echo $r | sed -e 's/^\/org\/gnome\/shell\//\//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
Error messages: | |
$ tailf /var/log/jenkins/jenkins.log | |
WARNING: Prober(fe80:0:0:0:c2b:e0ff:feff:d000%eth1.local.).run() exception | |
java.io.IOException: Operation not permitted (sendto failed) | |
at java.net.PlainDatagramSocketImpl.send(Native Method) | |
at java.net.DatagramSocket.send(DatagramSocket.java:693) | |
at javax.jmdns.impl.JmDNSImpl.send(JmDNSImpl.java:1537) | |
at javax.jmdns.impl.tasks.state.DNSStateTask.run(DNSStateTask.java:131) | |
at java.util.TimerThread.mainLoop(Timer.java:555) |
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
# Error message | |
$ tail -f /var/log/maillog | |
Dec 6 06:06:16 prdmgtjmp01 postfix/smtp[17822]: 0B11CC41153: to=<[email protected]>, relay=email-smtp.us-west2.amazonaws.com[35.162.44.160]:587, delay=4.2, delays=0.03/0.04/4.2/0, dsn=4.7.0, status=deferred (SASL authentication failed; cannot authenticate to server email-smtp.us-west-2.amazonaws.com[35.162.44.160]: no mechanism available) | |
Dec 6 06:11:04 prdmgtjmp01 postfix/qmgr[17814]: 9CA16C43607: from=<root@>, size=466, nrcpt=1 (queue active) | |
Dec 6 06:11:05 prdmgtjmp01 postfix/smtp[17830]: 78F56C41157: SASL authentication failed; cannot authenticate to server email-smtp.us-west-2.amazonaws.com[52.10.113.69]: no mechanism available | |
Dec 6 06:11:05 prdmgtjmp01 postfix/smtp[17829]: warning: SASL authentication failure: No worthy mechs found | |
# Solution: | |
$ yum install cyrus-sasl{,-plain} | |
# Try again: |
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 | |
set -e | |
git config -f .gitmodules --get-regexp '^submodule\..*\.path$' | | |
while read path_key path | |
do | |
url_key=$(echo $path_key | sed 's/\.path/.url/') | |
url=$(git config -f .gitmodules --get "$url_key") | |
git submodule add $url $path |
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 | |
if [ "$1" == "" ] | |
then | |
echo "Usage: ./ping .sh 192.168.1" | |
else | |
for x in `seq 1 254`; do | |
ping -c 1 $1.$x | grep "64 bytes" | cut -d " " -f 4 | sed 's/.$//' | |
done | |
fi |
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
-- Remove the history from | |
rm -rf .git | |
-- recreate the repos from the current content only | |
git init && git add . && git status | |
git commit -m "Initial commit" | |
-- push to the github remote repos ensuring you overwrite history | |
git remote add origin [email protected]:<YOUR ACCOUNT>/<YOUR REPOS>.git | |
git push -u --force origin master |
NewerOlder