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
apt-get remove docker docker-engine docker.io containerd runc | |
apt-get install ca-certificates curl gnupg lsb-release | |
mkdir -p /etc/apt/keyrings | |
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg | |
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | |
apt update | |
apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin |
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/sh | |
WORKDIR=/home/$USER/ghost | |
cd $WORKDIR | |
_date=$(date --iso-8601) | |
_backup_file_root=./backups/$_date | |
_backup_file_content=$_backup_file_root/content |
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
~/Code/test via 🐍 v3.10.7 | |
❯ cat folderA/lib.py | |
def test(): | |
print("Test") | |
~/Code/test via 🐍 v3.10.7 | |
❯ cat folderB/folderC/folderD/app.py | |
import os, sys | |
sys.path.append(os.path.join(os.path.dirname(__file__), '../../../')) |
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
syntax = "proto3"; | |
package worker; | |
option go_package="seraf-worker/workerpb"; | |
message WorkerRequest { | |
string crazy_work = 1; | |
} | |
message WorkerResponse { |
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 typing import List | |
import random | |
def f(x: List[int] = []) -> List[int]: | |
""" | |
Function that appends 1 random int to List x. | |
If no list is passed, returns a List with 1 element. |
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
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
func main() { | |
ch := make(chan struct{}, 5) |
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 | |
# Delete all Helm Releases in the default namespace | |
helm list | awk 'NR>1{print $1}'| xargs helm del |
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 | |
# Replace oldString with newString in all files in folder and nested folders | |
grep -rl "oldString" /your/path | xargs sed -i '' -e "s/oldString/newString/g" |
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' | |
volumes: | |
caddy_data: | |
caddy_config: | |
services: | |
caddy: | |
image: caddy | |
volumes: | |
- caddy_data:/data | |
- caddy_config:/config |
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' | |
volumes: | |
caddy_data: | |
caddy_config: | |
services: | |
caddy: | |
image: caddy | |
volumes: | |
- caddy_data:/data | |
- caddy_config:/config |
NewerOlder