Skip to content

Instantly share code, notes, and snippets.

@pushpak1300
pushpak1300 / code-smell.md
Created September 25, 2026 06:50
Code Smell Detection

You are auditing the codebase in the current working directory for code smells and architectural problems. The goal is an audit the maintainers can act on. Every finding should be real, verified against the current code, and not already tracked.

Inputs. Use these defaults unless the user overrides them:

  • Tracker file: AUDIT.md at the repo root. Create it if it's missing; add to new file if it exists.
  • Scope: all first-party source. Exclude vendored, generated and build output (vendor/, node_modules/, dist/, build/, lockfiles, migrations' generated SQL, compiled assets).
  • Changes allowed: the tracker file only. Don't edit source or tests, and don't commit.

Before you start

Learn the project before judging it.

@wilenius
wilenius / gist:ba83fc486af311e099f8e6bc76a1d65e
Created March 17, 2025 13:48
cmus remote control with midi, tmux notifications
#!/bin/bash
# Replace "<client name>" with your actual MIDI client name
CLIENT_NAME="Faderfox UC4"
# Function to convert seconds to HH:MM:SS format
convert_seconds_to_hhmmss() {
local total_seconds=$1
local hours=$((total_seconds / 3600))
local minutes=$(( (total_seconds % 3600) / 60 ))
@orlein
orlein / prompt.txt
Created September 25, 2026 08:53
게임개발프롬프트
# 역할
너는 이 프로젝트의 **Game Designer이자 Game Design Documentation Architect**다.
목표는 단순히 아이디어를 많이 제안하는 것이 아니라, 실제 Unity 게임으로 구현 가능한 수준까지 게임을 구조화하고, 게임 기획 문서를 장기간 유지 가능한 형태로 관리하는 것이다.
게임 기획과 기술 구현을 명확히 분리하되, 개발자가 이후 구현하기에 충분할 정도로 규칙과 상태를 명확하게 정의하라.
---
@jpt1122
jpt1122 / DrawTriangle.java
Last active September 25, 2026 10:03
JAVAFX: Draw polygon by mouse click and re-size shape by anchor points
package com.jay.shape.drawtriangle;
import java.util.ArrayList;
import java.util.List;
import javafx.application.Application;
import javafx.beans.property.DoubleProperty;
import javafx.beans.property.SimpleDoubleProperty;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.collections.FXCollections;

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.

@dais0n
dais0n / main.go
Last active September 25, 2026 09:57
gin and gorm api example
// cf. https://medium.com/@etiennerouzeaud/how-to-create-a-basic-restful-api-in-go-c8e032ba3181#.8bappfeoh
package main
import (
"time"
"github.com/gin-gonic/gin"
_ "github.com/go-sql-driver/mysql"
"github.com/jinzhu/gorm"
)
@dsetzer
dsetzer / ProStaking.js
Created August 20, 2021 11:37
Pro Staking Simulator
const fs = require('fs');
function calcRunningAvg(average, value, count) {
return (average * (count - 1) + value) / count;
}
class ProStaking {
constructor(initialBank, initialStake, divisor, targetPoints, takeProfit, stopLoss, resetOnLoss) {
this._round = 0;
this._sequence = 0;
@dsetzer
dsetzer / Pattern-System-v1.4.js
Last active September 25, 2026 09:52
Dynamic Pattern System v1.4 work in progress prototype for bustabit/bustadice scripts.
// ----------------------- V1.4 -------------------------
// This utility function will check an array of game results for a given pattern and return the most recent occurrence of a
// match. The pattern is specified using a regex-style syntax that uses the available tokens defined in the token list. The
// token list is an array of objects containing a token letter and a callback function that is used to check if the game results
// match the specified condition. It returns an array containing the game result objects for the matched results.
function checkPattern(pattern, results, tokens){
let tokenLetters = pattern.match(/\w/g);
let filteredTokens = tokens.filter((token) => tokenLetters.includes(token[0]));
let res = results.map((r, i) => (`[${i}${filteredTokens.filter((e) => e[1](r)).map((e) => (e[0])).join('')}]`)).reverse().join('');