Skip to content

Instantly share code, notes, and snippets.

@charl3y15
charl3y15 / ad-nsupdate.sh
Created September 10, 2026 20:25 — forked from ajorg/ad-nsupdate.sh
Update Active Directory DNS host records using machine / host / computer credentials and nsupdate
#!/bin/bash -e
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT-0
fqdn="$(hostname -f)"
address="$(/sbin/ip addr show dev eth1 | awk -F'( +|/)' '/inet / {print $3}')"
if [[ "${address}" == "$(dig +short "${fqdn}")" && "${fqdn}." == "$(dig +short -x "${address}")" ]]
then
exit 0
fi
TTL=21600 # 6 hours
@ryanbehdad
ryanbehdad / venv.md
Last active September 10, 2026 20:22
Python venv cheat sheet

Python venv virtual environment cheat sheet

Create a venv

To create a virtual environment, go to the root of your project and run

python -m venv venv

It will create a virtual environment called venv

Activate venv

.\venv\Scripts\activate

@jerodg
jerodg / windows_and_office_kms_setup.adoc
Last active September 10, 2026 20:20
Activate Windows and Office Using KMS Server

Microsoft Windows and Office KMS Setup

@pipethedev
pipethedev / go-deslop.md
Created September 7, 2026 13:10
Markdown file to de-slop your go codebase

Go Codebase Cleanup: Remove Defensive Over-Engineering and AI Slop

Audit this Go codebase and aggressively simplify AI-generated, defensive, overly abstract, or unnecessarily generic code.

The goal is to make the code look like it was written by an experienced Go engineer:

  • simple
  • explicit
  • strongly typed
  • boring
@frozenpandaman
frozenpandaman / widevine-decryption.md
Last active September 10, 2026 20:16
download videos protected with widevine DRM
@lightrush
lightrush / denoise
Last active September 10, 2026 20:14
Mic echo cancellation and noise suppression with PulseAudio and RNNoise
#!/bin/sh
# Usage:
# 1. Select the input (mic) and output (sound card) you want to eliminate echo
# and denoise in your sound settings as default input and output devices.
# 2. Run `denoise`.
#
# This process can be repeated without restarting PulseAudio. Just repeat the steps.

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@eholk
eholk / morse.js
Last active September 10, 2026 20:13
A Morse Code generator in Java Script
// Copyright 2014–2017, Eric Holk
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,

Go Goroutine Patterns

A practical tour of the concurrency patterns you actually reach for in Go, each with a runnable example and a short note on when it fits.


1. WaitGroup: fan-out, wait for all

Launch N independent goroutines and block until every one has finished. Add before the

@markasoftware
markasoftware / enterprise_token.rb
Last active September 10, 2026 20:02
OpenProject Enterprise mode for free
############ If you are using DOCKER all-in-one image, create Dockerfile like: ################
############ FROM openproject/openproject:16 ################
############ COPY ./enterprise_token.rb app/models/enterprise_token.rb ################
############ If you are runing a manual installation: ################
############ REPLACE app/models/enterprise_token.rb in the source code with this file! ################
############ also be sure to RESTART OpenProject after replacing the file. ################
############ If using some other set up (eg docker-compose), read the comments on ################
############ https://gist.github.com/markasoftware/f5b2e55a2c2e3abb1f9eefcdf0bfff45 ################