This file contains hidden or 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 | |
PATTERN="^([a-z0-9]+([._-]{0,1}[a-z0-9])*\/)*[a-zA-Z0-9]+([._-]{0,1}[a-z0-9])*(:[A-Za-z0-9][A-Za-z0-9.-]*){0,1}$" | |
for input in \ | |
i \ | |
image \ | |
i:t \ | |
i:t::: \ | |
image:t \ |
This file contains hidden or 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 | |
if [ $# -ne 2 ]; then | |
cat <<-EOF | |
Usage: reposync.sh <src-repo-uri> <target-repo-uri> | |
EOF | |
exit 1 | |
fi |
This file contains hidden or 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 | |
# | |
# RFC standard of the email address could be found in rfc5322, rfc6854, etc. | |
# | |
# however, it is hard to escape all the special characters in the bash | |
# so, in this script, it will only check for the address syntax only | |
# having some valid/invalid inputs to test its result | |
# | |
# please be noted that, it is not design to detect mailbox deliverability |
This file contains hidden or 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 python | |
import uuid | |
macaddr_hex = uuid.UUID(int=uuid.getnode()).hex[-12:] | |
print(':'.join(macaddr_hex[i:i + 2] for i in range(0, 11, 2))) |
This file contains hidden or 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 | |
CLEANUP=${1:-false} | |
echo | |
echo "CLEANUP: ${CLEANUP}" | |
echo | |
aws configure list --profile ecr >/dev/null 2>&1 | |
if [ $? -ne 0 ]; then |
This file contains hidden or 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
$ PACKER_LOG=1 AWS_ACCESS_KEY_ID=AKIAxxxxxx AWS_SECRET_ACCESS_KEY=XXXXXX packer build packer.json | |
2018/01/11 10:45:40 [INFO] Packer version: 1.1.3 | |
2018/01/11 10:45:40 Packer Target OS/Arch: darwin amd64 | |
2018/01/11 10:45:40 Built with Go Version: go1.9.2 | |
2018/01/11 10:45:40 Detected home directory from env var: /Users/user_name | |
2018/01/11 10:45:40 Using internal plugin for lxd | |
2018/01/11 10:45:40 Using internal plugin for parallels-pvm | |
2018/01/11 10:45:40 Using internal plugin for virtualbox-iso |
This file contains hidden or 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
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem] | |
"LongPathsEnabled"=dword:00000001 |
This file contains hidden or 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 | |
# prerequisite: | |
# - ec2 instance should attached proper iam role | |
# - awscli | |
# - kubectl | |
# Usage: | |
# | |
# define the following variales in your environment (root account) |
This file contains hidden or 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 | |
for pod in $(etcdctl ls /registry/pods/default); do | |
printf "%-16s ==> %s\n" "$(etcdctl get ${pod} | jq -r '.status.podIP')" "$(basename ${pod})" | |
done |
This file contains hidden or 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
# for Windows Server 2016 (or above) | |
# reference: | |
# - https://github.com/docker/labs/blob/master/windows/windows-containers/Setup-Server2016.md | |
# - https://docs.docker.com/engine/installation/linux/docker-ce/binaries/ | |
# - https://docs.docker.com/docker-for-windows/install/ | |
# setup basic requirement | |
Install-Module -Name PowerShellGet -MinimumVersion 1.1.3.2 -Force | |
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.208 -Force |
OlderNewer