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 | |
# Just copy and paste the lines below (all at once, it won't work line by line!) | |
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY! | |
function abort { | |
echo "$1" | |
exit 1 | |
} | |
set -e |
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 | |
# Check if the registry image is already installed | |
IS_INSTALLED=`docker images | grep -E 'registry\s*latest' | wc -l` | |
if [ $IS_INSTALLED == 0 ]; then | |
. /opt/elasticbeanstalk/hooks/common.sh | |
# Load ElasticBeanstalk environment variables | |
touch /tmp/env.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
#!/bin/bash | |
. /opt/elasticbeanstalk/hooks/common.sh | |
# Load ElasticBeanstalk environment variables | |
touch /tmp/env.sh | |
chmod 600 /tmp/env.sh | |
jq .docker.env[] $EB_CONFIG_FILE | tr -d \" > /tmp/env.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
#!/bin/sh | |
[[ -n "$1" && -n "$2" ]] || { echo "Usage: $0 <interface to grab multicast packets from> <interface to send modified packets to> [target MAC address 1] [target MAC address 2] ..."; exit 0 ; } | |
IIF=$1 | |
OIF=$2 | |
shift | |
shift | |
SRC_MACADDR=`ip link show $OIF | awk '/ether/ {print $2}' | tr -d :` |
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
server { | |
server_name docker-registry.mycompany.co.uk ; | |
listen 80; | |
# required to avoid HTTP 411: see Issue #1486 (https://github.com/dotcloud/docker/issues/1486) | |
chunked_transfer_encoding on; | |
# disable any limits to avoid HTTP 413 for large image uploads | |
client_max_body_size 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
#!/bin/sh | |
# Some things taken from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Set the colours you can use | |
black='\033[0;30m' | |
white='\033[0;37m' | |
red='\033[0;31m' | |
green='\033[0;32m' |
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 | |
OPENSSL_VERSION="1.0.1g" | |
curl -O http://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz | |
tar -xvzf openssl-$OPENSSL_VERSION.tar.gz | |
mv openssl-$OPENSSL_VERSION openssl_i386 | |
tar -xvzf openssl-$OPENSSL_VERSION.tar.gz | |
mv openssl-$OPENSSL_VERSION openssl_x86_64 | |
cd openssl_i386 |
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 | |
# socks over ssh tunnel | |
#----------------------------------------------------------------------------------------# | |
# ssh server set up # | |
#----------------------------------------------------------------------------------------# | |
# edit the sshd_config with nano as root | |
# sudo su |
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 | |
#----------------------------------------------------------------------------------------# | |
# Get local ip address for wifi # | |
#----------------------------------------------------------------------------------------# | |
ifconfig en0 |grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ print $2}' |
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 | |
#----------------------------------------------------------------------------------------# | |
# Get remote ipv4 address # | |
#----------------------------------------------------------------------------------------# | |
curl -s "http://v4.ipv6-test.com/api/myip.php" |
OlderNewer