Skip to content

Instantly share code, notes, and snippets.

View nfacha's full-sized avatar
:shipit:
Being a Squirrel

Nuno Facha nfacha

:shipit:
Being a Squirrel
View GitHub Profile
sudo sh -c 'echo $(ls /sys/bus/hid/drivers/hid-multitouch/ | grep "0003:222A:0001" | head -n 1) > /sys/bus/hid/drivers/hid-multitouch/unbind'
@nfacha
nfacha / Build Cloud Image Template
Last active September 23, 2022 18:19
Proxmox NAT VM config
wget https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img
qm create 8000 --memory 2048 --core 2 --name ubuntu-cloud --net0 virtio,bridge=vmbr0
qm importdisk 8000 focal-server-cloudimg-amd64.img local-lvm
qm set 8000 --scsihw virtio-scsi-pci --scsi0 local-lvm:vm-8000-disk-0
qm set 8000 --ide2 local-lvm:cloudinit
qm set 8000 --boot c --bootdisk scsi0
qm set 8000 --serial0 socket --vga serial0
@nfacha
nfacha / install-kubernetes-flannel-centos7.md
Created June 14, 2022 17:11 — forked from rkaramandi/install-kubernetes-flannel-centos7.md
Installing Kubernetes with the Flannel Network Plugin on CentOS 7

Install Prerequisites on ALL (Worker and Master) Nodes

Let's remove any old versions of Docker if they exist:

sudo yum remove docker \
                  docker-common \
                  docker-selinux \
                  docker-engine
@nfacha
nfacha / goLive.sh
Created June 8, 2022 22:35
OBS Audio Channels
#!/bin/bash
pactl load-module module-virtual-sink sink_name=ObsMusic
pactl load-module module-virtual-sink sink_name=ObsBlackhole
pactl load-module module-virtual-sink sink_name=ObsGame
#pactl list
#pactl unload-module 24
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFnqhUMBEACuAxzoc2xhVNKQjjj5KL9Qm14q5yFsZA1H9nynxI8hIKMmL8ME
8Awla8YReUPWsmKUNylhtjp+MnKonXQ/d1DlGTrvWX7SS064lGgOD+ywaEqD9hCc
fcBky1nCAbpajZY1n1onCQ3YK+T++IpDFTIRL5A7W4lbbKe/Md4x6lmZXIBWQb2d
cueb2Avqk0V/gBTRH/T0RLK36T9yA+Hb8G8ir9DV1KSzzNrJMi/sNwVAJHMFJcOE
Vg7eRrZ8z0ydlWgv9rFSTLxVJQy2XHhzHxthU6SAIkEVAwvy3T5FGkR4eBt5oFRo
GqIyx1BK5BvYxZ+7IkIJTbAWDQwYVJKuHrAOLTuk/DC+ksbIxF5kLS1wYgKBBjhr
wTZqZY3JZWwEQFqKXWNiWeoM6iED9YH26xavGl0l6YJrgTLwlCEoYfkSg9ks1vVi
TLH5NhasMnFWfAMetbRRQ0PWWsI3kL5IPUl4JzbQI4tjMYDnACwHvyHsG4ZHf8v5
@nfacha
nfacha / csfpost.sh
Last active June 26, 2021 12:05
Docker CSFPost
#!/bin/bash
chain_exists()
{
[ $# -lt 1 -o $# -gt 2 ] && {
echo "Usage: chain_exists <chain_name> [table]" >&2
return 1
}
local chain_name="$1" ; shift
[ $# -eq 1 ] && local table="--table $1"
@nfacha
nfacha / pom.xml
Last active July 12, 2020 11:43
Maven Deploy to Test Server
<plugin>
<groupId>ch.mfrey.maven.plugin</groupId>
<artifactId>copy-maven-plugin</artifactId>
<version>0.0.5</version>
<executions>
<execution>
<id>copy</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
docker run --rm -ti \
-v /var/run/docker.sock:/var/run/docker.sock \
bcicen/docker-replay \
-p <container>
@nfacha
nfacha / cmd.sql
Created April 19, 2020 11:50
Grant remote MySQL Access
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'
IDENTIFIED BY 'some_characters'
WITH GRANT OPTION;
FLUSH PRIVILEGES;
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12)
# │ │ │ │ ┌───────────── day of week (0 - 6) (Sunday to Saturday;
# │ │ │ │ │ 7 is also Sunday on some systems)
# │ │ │ │ │
# │ │ │ │ │
# * * * * * command_to_execute