Skip to content

Instantly share code, notes, and snippets.

@jeremytregunna
jeremytregunna / revert-systemd-userdb-birthdate.patch
Created March 19, 2026 19:14
Patch to revert systemd's userdb birthDate record bits. Valid as of 2026-03-19
diff --git a/docs/USER_RECORD.md b/docs/USER_RECORD.md
index 5335e145b5..9d6d8c1d03 100644
--- a/docs/USER_RECORD.md
+++ b/docs/USER_RECORD.md
@@ -273,9 +273,6 @@ This must be a string, and should follow the semantics defined in the
It's probably wise to use a location string processable by geo-location subsystems, but this is not enforced nor required.
Example: `Berlin, Germany` or `Basement, Room 3a`.
-`birthDate` → A string in ISO 8601 calendar date format (`YYYY-MM-DD`) indicating the user's date
-of birth. The earliest representable year is 1900. This field is optional.
@rondhi
rondhi / README.md
Last active July 4, 2026 13:13
How to stream games from OBS directly from Steam Deck's Gaming Mode

How to stream games from OBS directly from Steam Deck's Gaming Mode (as of 2023-02-26)

DISCLAIMER: As with any guide, please make sure to read through and understand everything before following the steps in this guide. I'm not responsible for you breaking anything on your own device. This guide assumes you have a little background with the linux command line as well as the text editor nano. If not, please educate yourself


Description: It's possible to stream Vulkan and OpenGL games from Gaming Mode on your Steam Deck. This guide is heavily based on robertkirkman's guide, which is linked multiple times throughout this guide. Much thanks to them


@toshimaru
toshimaru / check-server-process-using-jemalloc.rb
Last active January 29, 2025 21:00
Enable jemalloc for alpine.
# Check server process is using jemalloc
# ref. [Japanese] https://tech.studyplus.co.jp/entry/2019/09/09/094140
class AppController < ActionController::Base
def show
r = `strings /proc/#{Process.pid}/maps | grep jemalloc`
render plain: "<h1>#{ENV['LD_PRELOAD'].presence || 'empty'}</h1><pre>#{r}</pre>"
end
end
@lodi-g
lodi-g / HOWTO.md
Created March 14, 2021 14:19
How to setup a send-only mail server with TLS and SMTP credentials (postfix, submission, CyrusSASL)

Prepare server

  • sudo hostnamectl set-hostname example.com
  • sudo apt install mailutils postfix
    • Choose "internet site", and type your domain (example.com)

Test postfix

  • mail your-test@yopmail.com -s "Subject"
  • You should receive a mail from debian@example.com
@basti
basti / README.md
Last active April 7, 2023 16:25
AWS S3 CORS configuration for Rails ActiveStorage

AWS S3 now uses JSON for CORS configuration and cors.json is minimal configuration for Rails 7 direct uploads.

@ppoffice
ppoffice / README.md
Last active May 26, 2026 13:00
Install Visual Studio Code (actually code-server) on Android
  1. Install Termux, an Android terminal emulator that provides a Linux execution environment and various tools.

  2. Update system packages in Termux:

    $ pkg update -y
@ragul28
ragul28 / daemonset-scaledown.md
Created January 11, 2020 09:20
k8s Trick to Scale down daemonset to zero
  • Scaling k8s daemonset down to zero
kubectl -n kube-system patch daemonset myDaemonset -p '{"spec": {"template": {"spec": {"nodeSelector": {"non-existing": "true"}}}}}'
  • Scaling up k8s daemonset
kubectl -n kube-system patch daemonset myDaemonset --type json -p='[{"op": "remove", "path": "/spec/template/spec/nodeSelector/non-existing"}]'
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active July 14, 2026 13:46
set -e, -u, -o, -x pipefail explanation
@giannisp
giannisp / gist:ebaca117ac9e44231421f04e7796d5ca
Last active June 24, 2026 22:28
Upgrade PostgreSQL 9.6.5 to 10.0 using Homebrew (macOS)
After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work.
The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0."
Database files have to be updated before starting the server, here are the steps that had to be followed:
# need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default
brew unlink postgresql
brew install postgresql@9.6
brew unlink postgresql@9.6
brew link postgresql
import {
HttpInterceptor,
HttpRequest,
HttpResponse,
HttpHandler,
HttpEvent
} from '@angular/common/http';
import 'rxjs/add/operator/map';
@Injectable()