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 | |
# English: https://gist.github.com/rimelek/3fe8a0bc8da72903824296835e9ae5dd | |
# Video: https://youtu.be/H2y7zkQpwvs | |
set -eu -o pipefail | |
tree_width=40 | |
tree_character="X" | |
tree_trunk_character="M" |
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 | |
# Video: https://youtu.be/_wMgTx9pRVg | |
set -eu -o pipefail | |
tree_width=40 | |
tree_character="X" | |
tree_trunk_character="M" |
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 | |
set -eu -o pipefail | |
runtimes=(Host runc runsc kata) | |
YELLOW_START='\033[1;33m' | |
YELLOW_END='\033[0m' | |
declare -A COMMANDS=( |
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 | |
# This script creates a and starts an Ubuntu VM | |
# requirements: | |
# - libvirt | |
# - vit-manager | |
set -eu -o pipefail |
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
# Open a web browser from a web browser | |
# curl localhost:3000 | |
networks: | |
default: | |
internal: true | |
public: | |
services: | |
php: | |
image: itsziget/phar-examples:1.0 |
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
ZSH_THEME="agnoster" | |
plugins=(git docker docker-compose) | |
prompt_docker_host() { | |
docker_icon="\xF0\x9F\x90\xB3" | |
if [[ -n "$DOCKER_HOST" ]]; then | |
if [[ -n "$DOCKER_CONTEXT_HOST" ]] && [[ "$DOCKER_CONTEXT_HOST" == "$DOCKER_HOST" ]]; then | |
prompt_segment red default "$docker_icon $DOCKER_CONTEXT" | |
else |
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 | |
set -eu -o pipefail | |
function docker_desktop() { | |
CONTEXT_DESC="Docker Desktop" | |
DD_HOME="$HOME/.docker" |
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
FROM ubuntu | |
CMD bash -c 'echo -n "Type your name: " && read name && echo -n "Your name is " && echo $name && sleep 4' | |
# Test commands: | |
# docker build -t attachtest . | |
# docker run -d -it --name attachtest-container attachtest | |
# docker attach attachtest-container | |
# docker rm -f attachtest-container | |
# # Output should be the name you typed |
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
<?php | |
$str = 'r_\T_W | |
[QBQSC_^ID | |
yBZ | |
UWI | |
U]QY\D | |
]UBD | |
QJ | |
U\C_ |