Skip to content

Instantly share code, notes, and snippets.

View Placidina's full-sized avatar

Placidina

View GitHub Profile
@Placidina
Placidina / gist:3018ac3e0a5a8166d02f97f92dbee4a0
Last active May 30, 2023 14:08
WOTLK - Warrior Protection Macros
#showtooltip
/castsequence reset=1 Devastar, Golpe Heroico
/cast Devastar
/startattack
#showtooltip
/castsequence reset=2 Escudada, Golpe Heroico
/startattack
#showtooltip
@Placidina
Placidina / lenovo-s145-fedora34-hotfix.sh
Last active June 5, 2022 22:23
Script hotfix Lenovo S145 touchpad and bluetooth headset on Fedora 34
#!/bin/sh
KERNEL_TOUCHPAD="i8042.nopnp=1 pci=nocrs"
BROADCOM_BT_FIRMWARE_RPM_URL="https://github.com/winterheart/broadcom-bt-firmware/releases/download/v12.0.1.1105_p3/broadcom-bt-firmware-10.1.0.1115.rpm"
_touchpad() {
if ! grep "${KERNEL_TOUCHPAD}" /etc/default/grub > /dev/null 2>&1; then
sudo sed -i -E "s/(GRUB_CMDLINE_LINUX=)\"(.*)\"/\1\"${KERNEL_TOUCHPAD} \2\"/g" /etc/default/grub
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
fi
@Placidina
Placidina / forwarding.sh
Created November 14, 2019 00:18
Port Forwarding
#!/bin/bash
if [ "$EUID" -ne 0 ]; then
echo >&2 "Sorry, you need to run this as root"
exit 1
fi
iptables -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT
iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 32080
iptables -t nat -I OUTPUT -p tcp -o lo --dport 80 -j REDIRECT --to-ports 32080
@Placidina
Placidina / helm-could-not-find-tiller.txt
Created September 24, 2019 12:59
Error: could not find tiller
kubectl get all --all-namespaces | grep tiller
kubectl delete deployment tiller-deploy -n kube-system
kubectl delete service tiller-deploy -n kube-system
kubectl get all --all-namespaces | grep tiller
helm init
kubectl create serviceaccount --namespace kube-system tiller
kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'
# Gnerate keys
# Create the .ssh directory in your home directory if it does not exist
cd .ssh/
openssl genrsa -out key.pem 1024
openssl req -new -key key.pem -out request.pem
openssl x509 -req -days 9999 -in request.pem -signkey key.pem -out certificate.pem
openssl pkcs8 -topk8 -outform DER -in key.pem -inform PEM -out key.pk8 -nocrypt
#!/bin/bash
prog="$0"
while [ -h "${prog}" ]; do
newProg=`/bin/ls -ld "${prog}"`
newProg=`expr "${newProg}" : ".* -> \(.*\)$"`
if expr "x${newProg}" : 'x/' >/dev/null; then
prog="${newProg}"
else