Skip to content

Instantly share code, notes, and snippets.

View athif23's full-sized avatar
๐Ÿš€
Working

Muhammad Athif athif23

๐Ÿš€
Working
View GitHub Profile
@VictorTaelin
VictorTaelin / hvm_new_spec
Created August 26, 2025 21:29
HVM new spec
# ./HVM.hs #
# HVM
HVM is functional language and prover based on the Interaction Calculus.
It is a pure functional runtime like Haskell's GHC, with some peculiarities:
- Variables are affine, meaning they can only occur, at most, once.
- To copy values, linear thunks are used, where 2 vars refer to the same value.
- Accessing a thunk triggers an incremental, layer-by-layer copy of the value.

Beast Mode

Beast Mode is a custom chat mode for VS Code agent that adds an opinionated workflow to the agent, including use of a todo list, extensive internet research capabilities, planning, tool usage instructions and more. Designed to be used with 4.1, although it will work with any model.

Below you will find the Beast Mode prompt in various versions - starting with the most recent - 3.1

Installation Instructions

  • Go to the "agent" dropdown in VS Code chat sidebar and select "Configure Modes".
  • Select "Create new custom chat mode file"
@badlogic
badlogic / 01-update-docs.md
Last active July 27, 2025 19:31
Yakety Documentation (Ordered) - LLM-optimized docs with concrete file references

Update Documentation

You will generate LLM-optimized documentation with concrete file references and flexible formatting.

Your Task

Create documentation that allows humans and LLMs to:

  • Understand project purpose - what the project does and why
  • Get architecture overview - how the system is organized
  • Build on all platforms - build instructions with file references
import { DurableObject } from "cloudflare:workers";
export class MyDurableObject extends DurableObject<Env> {
public sql: SqlStorage
constructor(ctx: DurableObjectState, env: Env) {
super(ctx, env);
this.sql = ctx.storage.sql
}
@ScriptedAlchemy
ScriptedAlchemy / CursorTools.json
Created January 31, 2025 03:54
Reverse Engineering cursor prompts
{
"tools": [
{
"type": "function",
"function": {
"name": "codebase_search",
"description": "Find snippets of code from the codebase most relevant to the search query.\nThis is a semantic search tool, so the query should ask for something semantically matching what is needed.\nIf it makes sense to only search in particular directories, please specify them in the target_directories field.\nUnless there is a clear reason to use your own search query, please just reuse the user's exact query with their wording.\nTheir exact wording/phrasing can often be helpful for the semantic search query. Keeping the same exact question format can also be helpful.",
"parameters": {
"type": "object",
"properties": {
@willccbb
willccbb / grpo_demo.py
Last active October 30, 2025 05:50
GRPO Llama-1B
# train_grpo.py
#
# See https://github.com/willccbb/verifiers for ongoing developments
#
"""
citation:
@misc{brown2025grpodemo,
title={Granular Format Rewards for Eliciting Mathematical Reasoning Capabilities in Small Language Models},
author={Brown, William},
@kgni
kgni / context.ts
Created May 6, 2024 21:54
tRPC server (running on hono with adapter) - running on Cloudflare Workers - websocket connection in trpc context
import { type inferAsyncReturnType } from '@trpc/server';
import { Context as HonoContext } from 'hono';
import { getCookie } from 'hono/cookie';
import { Lucia, Session, User, verifyRequestOrigin } from 'lucia';
import { createAuth, getAllowedOriginHost } from '../auth';
import {
NeonDBWebSocketWithSchemas,
NeonDBWithSchemas,
createDBWebSocket,
@hajek-raven
hajek-raven / route.ts
Created January 10, 2024 11:02
Nextjs App router - Generate PDF
import chromium from "@sparticuz/chromium-min";
import { PDFDocument } from "pdf-lib";
import {Browser} from "puppeteer";
import { Browser as CoreBrowser } from "puppeteer-core";
export const GET = async (req: Request) => {
const reqUrl = new URL(req.url);
const searchParams = reqUrl.searchParams;
const origin = reqUrl.origin;
@markknol
markknol / shadertoy.md
Last active October 14, 2025 20:54
Shader cheatsheet (from shadertoy)

This help only covers the parts of GLSL ES that are relevant for Shadertoy. For the complete specification please have a look at GLSL ES specification

Language:

Version: WebGL 2.0
Arithmetic: ( ) + - ! * / %
Logical/Relatonal: ~ < > <= >= == != && ||
Bit Operators: & ^ | << >>
Comments: // /* */
Types: void bool int uint float vec2 vec3 vec4 bvec2 bvec3 bvec4 ivec2 ivec3 ivec4 uvec2 uvec3 uvec4 mat2 mat3 mat4 mat?x? sampler2D, sampler3D samplerCube
Format: float a = 1.0; int b = 1; uint i = 1U; int i = 0x1;

@getify
getify / 1.js
Last active September 29, 2021 11:58
experiment: mimicking React's new "useState()" hook for stand-alone functions, including "custom hooks"
"use strict";
[foo,bar] = TNG(foo,bar);
// NOTE: intentionally not TNG(..) wrapping useBaz(), so that it's
// basically like a "custom hook" that can be called only from other
// TNG-wrapped functions
function foo(origX,origY) {
var [x,setX] = useState(origX);
var [y,setY] = useState(origY);