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
if [ -z "$PASSWORD" ]; then | |
echo "Need to export PASSWORD" | |
exit 1 | |
fi | |
docker pull duanenielsen/assistant | |
rm docker-compose.yml | |
wget https://raw.githubusercontent.com/DuaneNielsen/assistant/master/docker-compose.yml | |
docker-compose stop assistant | |
docker rm assistant | |
docker-compose up -d assistant |
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
openssl s_client -tls1 -showcerts -connect localhost:443 -nbio -state </dev/null |
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
docker exec -it $1 bash |
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
docker run -it --entrypoint bash $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
git config --global credential.helper cache | |
git config --global credential.helper "cache --timeout=7800" |
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/env bash | |
# OpenSSL requires the port number. | |
SERVER=0.0.0.0:8080 | |
DELAY=1 | |
ciphers=$(openssl ciphers 'ALL:eNULL' | sed -e 's/:/ /g') | |
echo Obtaining cipher list from $(openssl version). | |
for cipher in ${ciphers[@]} |
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
nc -vz <ip> <port> |
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
docker inspect postgres-data | |
cd /var/lib/docker/volumes/postgres-data/_data | |
cp -L /etc/letsencrypt/live/vixkings.com/fullchain.pem . | |
cp -L /etc/letsencrypt/live/vixkings.com/privkey.pem . | |
chmod 400 fullchain.pem | |
chmod 400 privkey.pem |
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
// Async task (same in all examples in this chapter) | |
function async(arg, callback) { | |
console.log('do something with \''+arg+'\', return 1 sec later'); | |
setTimeout(function() { callback(arg * 2); }, 1000); | |
} | |
// Final task (same in all the examples) | |
function final() { console.log('Done', results); } | |
// A simple async series: | |
var items = [ 1, 2, 3, 4, 5, 6 ]; |
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
function async(arg, callback) { | |
console.log('do something with \''+arg+'\', return 1 sec later'); | |
setTimeout(function() { callback(arg * 2); }, 1000); | |
} | |
function final() { console.log('Done', results); } | |
var items = [ 1, 2, 3, 4, 5, 6 ]; | |
var results = []; | |
items.forEach(function(item) { |
OlderNewer