Skip to content

Instantly share code, notes, and snippets.

View diegograssato's full-sized avatar
🏠
Working from home

Diego Pereira Grassato diegograssato

🏠
Working from home
View GitHub Profile
https://learn.microsoft.com/pt-pt/training/paths/github-foundations-2/
@diegograssato
diegograssato / minikube-upgrade.md
Created August 17, 2024 13:30 — forked from nikhita/minikube-upgrade.md
How to upgrade minikube to the latest version in Linux.

Find the current version

$ minikube version
minikube version: v1.7.1

Check if there are newer versions available

@diegograssato
diegograssato / GVM
Created April 28, 2024 01:59
NVM e GVM
https://github.com/moovweb/gvm
sudo apt-get install bison
bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
gvm install go1.22.2 -B
gvm use go1.22.2
@diegograssato
diegograssato / gist:a72f3f48d328da960f19051f5daae6c1
Created April 9, 2024 13:26 — forked from ibnux/gist:59dd7d64bd9cb7e1e670b6ddd70ad991
Mikrotik Script for DHCP Lease to Queue simple
:local queueName "Client-$leaseActMAC";
:local ipAdd "$leaseActIP/32";
:if ([:len [/queue simple find name=$queueName]] = 0) do={
:log info "No Queue";
/queue simple add name=$queueName target=($ipAdd) limit-at=10M/4M max-limit=10M/4M comment=[/ip dhcp-server lease get [find where active-mac-address=$leaseActMAC && active-address=$leaseActIP] host-name];
} else={
:log info "exists";
:local ada [/queue simple get [find name=$queueName] target];
{
"id": "45c0996e-ac5e-4271-80e1-a09a16391a27",
"name": "Sonoff Mini",
"values": [
{
"key": "sonoff_ip",
"value": "10.0.1.32",
"enabled": true
},
{

How use

Update your system:

sudo apt update && sudo apt upgrade

Install WireGuard:

apt install wireguard net-tools curl wget git
@diegograssato
diegograssato / pf_nat
Created August 4, 2021 15:25
Enable NAT on macOS
#!/bin/bash
cat > /usr/local/etc/pf-nat.conf << EOF
nat on en0 from vnic1:network to any -> (en0)
EOF
sudo pfctl -d
sudo sysctl -w net.inet.ip.forwarding=1
sudo pfctl -f /usr/local/etc/pf-nat.conf -e
---
#https://doc.owncloud.com/server/10.7/admin_manual/installation/docker/#raspberry-pi
version: '3.7'
services:
traefik:
container_name: proxy
image: traefik
restart: always
command:
- "--log.level=DEBUG"
@diegograssato
diegograssato / Install-kind.sh
Last active April 29, 2021 19:24
Cluster with kind
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.9.0/kind-linux-amd64
chmod +x ./kind
mv ./kind $HOME/.local/bin/kind
@diegograssato
diegograssato / osb
Last active September 21, 2020 20:55
Install OBS flatpak
flatpak from Ubuntu package server via the following command.
sudo apt update && sudo apt install flatpak
https://github.com/bazukas/obs-linuxbrowser
https://linuxhint.com/install_obs_ubuntu/#:~:text=Install%20OBS%20from%20Ubuntu%20Package%20Server&text=To%20get%20this%20program%20from,refresh%20the%20APT%20repository%20cache.&text=Now%2C%20install%20OBS%20Studio.