Skip to content

Instantly share code, notes, and snippets.

@jauderho
jauderho / gist:de656fcb11a5342233ab5c5ca19c8dac
Last active May 22, 2024 18:55
HOWTO: Upgrade to Alpine 3.20
#!/bin/ash
# There are some breaking changes to EFI upgrading from earlier versions of Alpine to 3.20
# The following should work based on the 3.20 changelog
# It should be run as root after upgrading to 3.20 BUT before rebooting. YMMV
# Links
# https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.20.0
# https://gitlab.alpinelinux.org/alpine/alpine-conf/-/blob/master/setup-disk.in#L320-324
@jauderho
jauderho / script.js
Created February 16, 2024 05:25 — forked from gd3kr/script.js
Download a JSON List of twitter bookmarks
/*
the twitter api is stupid. it is stupid and bad and expensive. hence, this.
Literally just paste this in the JS console on the bookmarks tab and the script will automatically scroll to the bottom of your bookmarks and keep a track of them as it goes.
When finished, it downloads a JSON file containing the raw text content of every bookmark.
for now it stores just the text inside the tweet itself, but if you're reading this why don't you go ahead and try to also store other information (author, tweetLink, pictures, everything). come on. do it. please?
*/
@jauderho
jauderho / gl.conf
Last active December 8, 2023 05:01
GLinet optimized and secured /etc/nginx/conf.d/gl.conf
# The default config still enables TLS 1.0 and 1.1
#
# This only allows TLS 1.2 as well as narrows the cipher options considerably
index gl_home.html;
lua_shared_dict shmem 12k;
lua_shared_dict nonces 16k;
lua_shared_dict sessions 16k;
lua_code_cache off;
@jauderho
jauderho / gist:67ff70804f21d88bd66e69d84e5d8783
Last active June 29, 2024 20:26
HOWTO: Switch OpenWrt from using wolfssl to mbedtls manually (22.03 to 23.05)
#!/bin/sh
#
# from https://forum.openwrt.org/t/openwrt-23-05-0-rc1-first-release-candidate/162544/27
#
# auc will not work as-is to upgrade from 22.03 to 23.05 due to the mbedtls switch
# therefore, we need to first switch from wolfssl to mbedtls while on 22.03 before using auc
#
cd /root || exit
opkg update
@jauderho
jauderho / gist:6b7d42030e264a135450ecc0ba521bd8
Last active December 2, 2024 00:32
HOWTO: Upgrade Raspberry Pi OS from Bullseye to Bookworm
### WARNING: READ CAREFULLY BEFORE ATTEMPTING ###
#
# Officially, this is not recommended. YMMV
# https://www.raspberrypi.com/news/bookworm-the-new-version-of-raspberry-pi-os/
#
# This mostly works if you are on 64bit. You are on your own if you are on 32bit or mixed 64/32bit
#
# Credit to anfractuosity and fgimenezm for figuring out additional details for kernels
#
@jauderho
jauderho / gist:d48141e2ce46c288a1ca4daaf4662c42
Created May 29, 2022 21:09
Extract malicious URLs identified on Twitter
# https://grimminck.medium.com/building-a-threat-intelligence-feed-using-the-twitter-api-and-a-bit-of-code-5787808e32ef
# https://news.ycombinator.com/item?id=31544816
curl https://twitter.threatintel.rocks/ --silent | jq -r '.malicious_urls | .[]' | sort -u | grep -v …
@jauderho
jauderho / gist:fac23f45196860a3a7f4413ff139f859
Last active April 1, 2022 21:14
Retry Git push with backoff
#!/bin/bash
# Retries a command a with backoff.
#
# The retry count is given by ATTEMPTS (default 100), the
# initial backoff timeout is given by TIMEOUT in seconds
# (default 5.)
#
# Successive backoffs increase the timeout by ~33%.
#
@jauderho
jauderho / prodfiler-compose.yml
Created September 4, 2021 23:27
Docker Compose file for Optimyze Prodfiler
services:
prodfiler:
container_name: prodfiler
image: optimyze/pf-host-agent:release-1.0.0
privileged: true
pid: host
command: ["/root/pf-host-agent", "-t", "all"]
environment:
- PRODFILER_PROJECT_ID=${PRODFILER_PROJECT_ID}
@jauderho
jauderho / Public time servers with anycast NTP support.md
Last active April 25, 2024 10:47
This is a curated list of NTP time servers that have anycast IP addresses. This is useful for devices/appliances that can only use IP addresses for defined NTP servers.

Cloudflare (AS13335)

server 162.159.200.123

server 162.159.200.1

Facebook (AS32934)

server 129.134.28.123 # SJC

@jauderho
jauderho / Time Servers with NTS support.md
Last active October 15, 2024 16:25
A curated list of NTP time servers that support NTS