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
function apt-history(){ | |
case "$1" in | |
install) | |
cat /var/log/dpkg.log | grep 'install ' | |
;; | |
upgrade|remove) | |
cat /var/log/dpkg.log | grep $1 | |
;; | |
rollback) | |
cat /var/log/dpkg.log | grep upgrade | \ |
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 | |
# Update system packages | |
apt-get update | |
apt-get upgrade -y | |
# Install Apache web server | |
apt-get install -y apache2 | |
# Add PHP repository and install PHP 8.2 |
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 update | |
apt upgrade | |
echo "PubkeyAuthentication yes | |
PasswordAuthentication yes" >> /etc/ssh/sshd_config | |
systemcl restart ssh | |
sed -i '/^%sudo/c\%sudo ALL=(ALL) NOPASSWD:ALL' /etc/sudoers | |
usermod -aG sudo <user> | |
usermod -s /bin/bash <user> |
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 | |
alias ll='ls -la' | |
# Editor: VIM | |
export EDITOR='nvim' | |
export VISUAL='nvim' | |
alias k=kubectl | |
alias tf='terraform' | |
alias i='/sbin/ifconfig' |
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
import * as dns from "node:dns"; | |
import { $ } from 'bun'; | |
const addrs = await dns.promises.resolveSrv("_web1._tcp.mydomain.local"); | |
console.log(addrs); |
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
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml |
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 pull registry.k8s.io/ingress-nginx/controller:v1.8.1 | |
docker pull registry.k8s.io/ingress-nginx/kube-webhook-certgen:v20230407 | |
kind load docker-image -n dev registry.k8s.io/ingress-nginx/controller:v1.8.1 | |
kind load docker-image -n dev registry.k8s.io/ingress-nginx/kube-webhook-certgen:v20230407 |
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
cat <<EOF | kind create cluster --name dev --config=- | |
kind: Cluster | |
apiVersion: kind.x-k8s.io/v1alpha4 | |
nodes: | |
- role: control-plane | |
kubeadmConfigPatches: | |
- | | |
kind: InitConfiguration | |
nodeRegistration: | |
kubeletExtraArgs: |
NewerOlder