Skip to content

Instantly share code, notes, and snippets.

@Kishi85
Kishi85 / nft2ipset
Created May 17, 2024 07:44
/etc/init.d/nft2ipset: An nftables set to ipset synchronizer for use with OpenWRT/mwan3
#!/bin/sh /etc/rc.common
# Start before firewall and mwan3 which are at Prio 19
START=18
APP=nft2ipset
USE_PROCD=1
SCRIPTPATH="/tmp/nft2ipset"
write_script() {
cat > "$1" <<'EOT'
#!/bin/sh
@MaggieFero
MaggieFero / altmilkpairing.md
Created April 25, 2024 21:04
AltMilks: A Pairing Decision

As a diverse array of alt-milks continues to proliferate, I'm seeing more and more questions about "which is the best altmilk." As with nearly-any question someone might end up answering on GitHub, my answer is that it depends. Some amount depends on personal flavor preferences. I think that more of this than you might expect, though, is a matter of pairing.

Background

First, why do I have so many opinions on alt milks. I have tried all of:

  • rice milk
  • oat milk
  • sesame milk
  • walnut milk
  • macadamia nut milk
  • coconut milk
@schacon
schacon / better-git-branch.sh
Created January 13, 2024 18:41
Better Git Branch output
#!/bin/bash
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
NO_COLOR='\033[0m'
BLUE='\033[0;34m'
YELLOW='\033[0;33m'
NO_COLOR='\033[0m'
@scyto
scyto / proxmox.md
Last active November 14, 2024 22:24
my proxmox cluster

ProxMox Cluster - Soup-to-Nutz

aka what i did to get from nothing to done.

note: these are designed to be primarily a re-install guide for myself (writing things down helps me memorize the knowledge), as such don't take any of this on blind faith - some areas are well tested and the docs are very robust, some items, less so). YMMV

Purpose of Proxmox cluster project

Required Outomces of cluster project

@vaurora
vaurora / block_personal_appts
Last active March 29, 2023 15:11 — forked from ttrahan/block_personal_appts
Google Apps Script to automatically create, edit and delete events on work calendar for personal calendar events. Instructions on how to set up can be found at https://medium.com/@willroman/auto-block-time-on-your-work-google-calendar-for-your-personal-events-2a752ae91dab
function sync() {
// CHANGE - id(s) of the secondary calendar to pull events from
// If you have more than one calendar, use the form ["XXXXXX", "YYYYY"]
var ids=["XXXXXXXXXX"];
var today=new Date();
var enddate=new Date();
enddate.setDate(today.getDate()+7); // how many days in advance to monitor and block off time
@ghuntley
ghuntley / configuration.nix
Last active May 6, 2023 16:27
ghuntley-net
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, lib, pkgs, ... }:
{
imports =
[
./hardware-configuration.nix
];
@VyrCossont
VyrCossont / mastodon-advanced-search.md
Last active January 27, 2023 03:43
filter by users and sort by date in Mastodon. see https://demon.social/@vyr/109296080568061011

new search features

  • setting SEARCH_ALL_VISIBLE_TOOTS=true in your instance config will let users search all non-private posts, not just the ones they've interacted with.
  • prefixing a search query with 🔍 will use ES simple query string syntax instead of Mastodon's weird broken subset of it, which will let you use "double quotes" for literal strings including white space, + to force a term to be included, or - to force a term to be excluded.
  • prefixing a search query with 🔎 will use ES regular query string syntax which is like simple query syntax, except:
    • syntax errors will cause the search to fail, so if you don't get anything back, that's why.
  • you can specify individual fields to match on. if you don't specify a field for a given search term, it does a normal full-text search for
@TonyApuzzo
TonyApuzzo / openevse2.yaml
Last active November 30, 2023 19:35
new openevse package
###
# OpenEVSE package for Home Assistant
# Supports ONLY MQTT interactions
# Author: Tony Apuzzo
#
# 2022-11-23 - Updates for MQTT platform changes coming in HASS 2022.12
###
mqtt:
number:
@pervognsen
pervognsen / shift_dfa.md
Last active November 1, 2024 23:53
Shift-based DFAs

A traditional table-based DFA implementation looks like this:

uint8_t table[NUM_STATES][256]

uint8_t run(const uint8_t *start, const uint8_t *end, uint8_t state) {
    for (const uint8_t *s = start; s != end; s++)
        state = table[state][*s];
    return state;
}
@sekcompsci
sekcompsci / Comparison Espressif ESP MCUs.md
Last active November 15, 2024 03:20 — forked from fabianoriccardi/Comparison Espressif ESP MCUs.md
Comparison chips (SoCs) table for ESP8266/ESP32/ESP32-S2/ESP32-S3/ESP32-C3/ESP32-C6. Forked from @fabianoriccardi

Comparison chips (SoCs) table for ESP8266/ESP32/ESP32-S2/ESP32-S3/ESP32-C3/ESP32-C6

A minimal table to compare the Espressif's MCU families.

ESP8266 ESP32 ESP32-S2 ESP32-S3 ESP32-C3 ESP32-C6
Announcement Date 2014, August 2016, September 2019, September 2020, December