Skip to content

Instantly share code, notes, and snippets.

View gomasy's full-sized avatar

Gomasy gomasy

View GitHub Profile
package main
import (
"bufio"
"fmt"
"log"
"net"
"strconv"
"golang.org/x/text/transform"
diff --git a/configure.ac b/configure.ac
index 82e8bb7..a431e05 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4870,6 +4870,30 @@ AC_SUBST([GSSLIBS])
AC_SUBST([K5LIBS])
AC_SUBST([CHANNELLIBS])
+# Check whether user wants systemd support
+SYSTEMD_MSG="no"
@gomasy
gomasy / tailscaled
Last active May 4, 2024 00:20
Test implementation of /etc/init.d/tailscaled
#!/bin/bash
#
# tailscaled Start up the Tailscale server daemon
#
# description: A mesh VPN that makes it easy to connect your devices, wherever they are.
#
# processname: tailscaled
### BEGIN INIT INFO
# Provides: tailscaled
-- UNRELATED ACCOUNT ONLY
DELETE FROM statuses WHERE local IS false AND id NOT IN (SELECT status_id FROM status_pins) AND id NOT IN (SELECT status_id FROM favourites) AND id NOT IN (SELECT status_id FROM bookmarks) AND id NOT IN (SELECT id FROM statuses WHERE id IN (SELECT reblog_of_id FROM statuses WHERE reblog_of_id IS NOT NULL AND (account_id <= 10 OR account_id IN (SELECT target_account_id FROM follows WHERE account_id <= 10)))) AND id NOT IN (SELECT activity_id FROM notifications WHERE type = 'reblog') AND id NOT IN (SELECT status_id FROM mentions WHERE id IN (SELECT activity_id FROM notifications WHERE type = 'mention')) AND account_id NOT IN (SELECT target_account_id FROM follows WHERE account_id <= 10) AND created_at < '';
-- ALL
DELETE FROM statuses WHERE local IS false AND id NOT IN (SELECT status_id FROM status_pins) AND id NOT IN (SELECT status_id FROM favourites) AND id NOT IN (SELECT status_id FROM bookmarks) AND id NOT IN (SELECT id FROM statuses WHERE id IN (SELECT reblog_of_id FROM statuses