Skip to content

Instantly share code, notes, and snippets.

View dgnsrekt's full-sized avatar
🖥️
I prefer to self-host.

🫠 dgnsrekt

🖥️
I prefer to self-host.
  • Fomo Driven Development
  • All vibes and no breaks.
  • X @dgnsrekt
View GitHub Profile
@ljw1004
ljw1004 / you_are_not_right.sh
Last active November 19, 2025 17:05
A UserPromptSubmit hook for Claude Code to stop it saying "You're right"
#!/bin/bash
set -euo pipefail
trap 'echo "at line $LINENO, exit code $? from $BASH_COMMAND" >&2; exit 1' ERR
# This is a Claude Code hook to stop it saying "you are right".
#
# Installation:
# 1. Save this script and chmod +x it to make it executable.
# 2. Within Claude Code, /hooks / UserPromptSubmit > Add a new hook (this file)
#
#!/bin/bash
#==============================================================================
# Claude Code Quick Start Setup Script
#==============================================================================
#
# DESCRIPTION:
# This script automates the setup of Claude Code on macOS, including all
# required dependencies and configuration. It installs Homebrew, Node.js,
# AWS CLI, Claude Code, and configures AWS SSO integration.
@iamnolanhu
iamnolanhu / CHATGPT VERSION (GPT-4 | GPT-4.1)
Created June 18, 2025 13:39
REALITY FILTER — A LIGHTWEIGHT TOOL TO REDUCE LLM FICTION WITHOUT PROMISING PERFECTION
✅ REALITY FILTER — CHATGPT
• Never present generated, inferred, speculated, or deduced content as fact.
• If you cannot verify something directly, say:
- “I cannot verify this.”
- “I do not have access to that information.”
- “My knowledge base does not contain that.”
• Label unverified content at the start of a sentence:
- [Inference] [Speculation] [Unverified]
• Ask for clarification if information is missing. Do not guess or fill gaps.
@bahadiraraz
bahadiraraz / Git_Commit_Freeze_Solution.md
Last active December 2, 2025 10:39
Git Commit Freeze Due to GPG Lock Issues (Solution)

Git Commit Freeze Due to GPG Lock Issues

If you encounter a problem where you cannot commit changes in Git – neither through the terminal nor via the GitHub Desktop application – the issue might be a freeze during the Git commit process. This is often caused by GPG lock issues. Below is a concise and step-by-step guide to resolve this problem.

Solution Steps

1. Check for GPG Lock Messages

Open your terminal and try to perform a GPG operation (like signing a test message). If you see repeated messages like gpg: waiting for lock (held by [process_id]) ..., it indicates a lock issue.

@tobischw
tobischw / index.js
Created June 4, 2022 19:01
Automatically generate commit messages based on diffs using GPT-3
// 1. npm init
// 2. npm install -save openai simple-git
// 3. Grab an API key from OpenAI: https://beta.openai.com/account/api-keys
// 4. Replace FOLDER_TO_CHECK with the root path of your git-enabled project
//
// Eventually the goal of this is to have a command line utility that lets users
// generates the commit message and commit immediately.
const { Configuration, OpenAIApi } = require("openai");
const simpleGit = require('simple-git');
@jerry-git
jerry-git / vax_app.py
Last active September 19, 2024 12:20
Simple modern Python web app
import datetime as dt
import os
import motor
from beanie import Document, Indexed, PydanticObjectId, init_beanie, operators
from fastapi import FastAPI, Response, status
from pydantic import BaseModel
app = FastAPI()
@mjackson
mjackson / redirects-in-react-router-v6.md
Last active November 18, 2025 19:38
Notes on handling redirects in React Router v6, including a detailed explanation of how this improves on what we used to do in v4/5

Redirects in React Router v6

An important part of "routing" is handling redirects. Redirects usually happen when you want to preserve an old link and send all the traffic bound for that destination to some new URL so you don't end up with broken links.

The way we recommend handling redirects has changed in React Router v6. This document explains why.

Background

In React Router v4/5 (they have the same API, you can read about why we had to bump the major version here) we had a <Redirect> component that you could use to tell the router when to automatically redirect to another URL. You might have used it like this:

version: "3"
services:
sftpgo:
image: "drakkan/sftpgo:v2-alpine"
# default user id
user: 1026
restart: always
expose:
# HTTP
- "8080"
@aanari
aanari / set-alacritty-default.sh
Last active June 15, 2025 21:10
Set Alacritty as Default Terminal Editor (Ubuntu)
sudo update-alternatives --install /usr/bin/x-terminal-emulator x-terminal-emulator $(which alacritty) 50
sudo update-alternatives --config x-terminal-emulator
@ismailyenigul
ismailyenigul / timescaledb-timescaledb-postgresql-adaptor-docker-compose.yml
Last active October 15, 2025 10:08
docker compose for timescaledb and postgresql-adaptor
I choosed host path mapping for postgresql data directory in a separate OS disk to be able to resize partition later.
You can use docker standart volumes too.
# mkdir -p /data/timescaledb
# cat docker-compose.yml
version: '3'
services: