Skip to content

Instantly share code, notes, and snippets.

View felipecrs's full-sized avatar

Felipe Santos felipecrs

View GitHub Profile
@felipecrs
felipecrs / disabling-haos-swap.md
Created June 15, 2025 17:33
Disabling HAOS Swap

Should be as simple as running this command as is within some Terminal add-on:

curl -fsSL -H "Authorization: Bearer ${SUPERVISOR_TOKEN}" http://supervisor/os/config/swap -d '{"swap_size": "0"}'
@felipecrs
felipecrs / update_go2rtc.sh
Created June 2, 2025 16:42
update_go2rtc.sh
#!/bin/bash
set -euxo pipefail
version="${1:-latest}"
case $(uname -m) in
x86_64) arch="amd64" ;;
aarch64) arch="arm64" ;;
*)
@felipecrs
felipecrs / gerrit_to_github.lua
Last active May 24, 2025 04:04
Gerrit Webhook to GitHub Repository Dispatch API Converter
local json = require("json")
-- request body is in r.RequestBody, use it as any other string:
local body, err = json.decode(r.RequestBody)
if err then error(err) end
local new_body = {
event_type = "gerrit-" .. body["type"],
client_payload = body
}
@felipecrs
felipecrs / git-commands.md
Last active April 4, 2023 14:29
Git commands snippets

Track all files to commit

git add .

Commit

git commit

Update local branch master

git pull origin master

Update local branch master when you have commits pending push

git pull --rebase origin master

Push changes to master branch on remote

git push origin master