https://docs.docker.com/docker-for-mac/osxfs/#ssh-agent-forwarding
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
# https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/filter/core.py | |
# https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/kms.html | |
import boto3 | |
import base64 | |
kms = boto3.client('kms', region_name='eu-central-1') | |
def aws_kms_decrypt(ciphertext): | |
''' |
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
set -ex | |
# https://kubernetes.io/docs/tasks/run-application/run-stateless-application-deployment/ | |
# create | |
kubectl apply -f https://k8s.io/examples/application/deployment.yaml | |
kubectl describe deployment nginx-deployment | |
kubectl get pods -l app=nginx | |
sleep 20s |
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
grep -q docker /proc/1/cgroup |
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 sh | |
# https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-snapshots.html | |
snapshots=$( \ | |
aws ec2 describe-snapshots \ | |
--region eu-central-1 \ | |
--owner-id $OWNER_ID \ | |
--filters 'Name=description,Values="Created by CreateImage*",Name=status,Values=completed' | |
) |
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
curl https://api.github.com/repos/barnybug/cli53/releases/latest \ | |
| jq --raw-output '.assets[] | select(.name == "cli53-linux-amd64") | .browser_download_url' \ | |
| xargs curl --location --output /usr/local/bin/cli53 |
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
youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4' <URL> |
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
### Debian snippets/fastcgi-php.conf | |
# regex to split $uri to $fastcgi_script_name and $fastcgi_path | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
# Check that the PHP script exists before passing it | |
try_files $fastcgi_script_name =404; | |
# Bypass the fact that try_files resets $fastcgi_path_info | |
# see: http://trac.nginx.org/nginx/ticket/321 | |
set $path_info $fastcgi_path_info; |
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
# FROM https://hub.docker.com/_/php/ | |
RUN mkdir /usr/src/php | |
RUN tar --file /usr/src/php.tar.xz --extract --strip-components=1 --directory /usr/src/php | |
RUN cp /usr/src/php/php.ini-production /usr/local/etc/php/php.ini |
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 image rm $(docker image ls --quiet --filter dangling=true) |
NewerOlder