dig o-o.myaddr.l.google.com txt @ns1.google.com +short
# OR
nslookup -type=txt o-o.myaddr.l.google.com ns1.google.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
version: "3.8" | |
services: | |
traefik: | |
image: traefik:v2.4.9 | |
deploy: | |
replicas: 1 | |
placement: | |
constraints: [node.role == manager] | |
ports: |
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
version: "3.9" | |
services: | |
traefik: | |
# Use the latest v3.0.x Traefik image available | |
image: traefik:v3.0 | |
ports: | |
# Listen on port 80, default for HTTP, necessary to redirect to HTTPS | |
- target: 80 | |
published: 80 |
UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker
now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.
Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/
sudo amazon-linux-extras install docker
sudo service docker start
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
<?php | |
/** | |
* @link http://stackoverflow.com/questions/13865149/speeding-up-xml-schema-validations-of-a-batch-of-xml-files-against-the-same-xml | |
*/ | |
$mapping = [ | |
'http://www.w3.org/2002/08/xhtml/xhtml1-transitional.xsd' => 'schema/xhtml1-transitional.xsd', | |
'http://www.w3.org/2001/xml.xsd' => 'schema/xml.xsd', | |
]; |
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 | |
# fork from https://gist.github.com/jakemhiller/d342ad51505addf78ec628a16fd3280f | |
changed_files="$(git diff-tree -r --name-only --no-commit-id $1 $2)" | |
check_run() { | |
echo "$changed_files" | grep --quiet "$1" && eval "$2" | |
} | |
check_run package.json "npm prune && npm install" |
https://kubernetes.io/docs/reference/kubectl/cheatsheet/
export KUBECONFIG={cert-file}
kubectl config use-context {context}
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 | |
# Copyright © 2017 Google Inc. | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software |
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
# Quick debug network traffic between nginx and php-fpm | |
# Got from: | |
# http://systembash.com/content/simple-sysadmin-trick-using-tcpdump-to-sniff-web-server-traffic/ | |
# Just a flow of everything looking like a string | |
tcpdump -nl -w - -i eth0 -c 500 port 9090 | strings | |
# Request heads | |
sudo tcpdump -nl -w - -i eth0 -c 500 port 9090 | strings | grep -E -A5 "^(GET|PUT|POST) " | |
# strace processes/sub-processes |
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
sudo su - | |
mkdir -p /opt/bin | |
curl -L https://github.com/docker/compose/releases/download/1.12.0/docker-compose-`uname -s`-`uname -m` >/opt/bin/docker-compose | |
chmod +x /opt/bin/docker-compose |
NewerOlder