Skip to content

Instantly share code, notes, and snippets.

/*=============================================================================
ReShade 5 effect file
github.com/martymcmodding
Author: Pascal Gilcher / Marty McFly
ReShade Motion Estimation Shader for dense 2D UV-space motion vectors
Based on ReShade Motion Estimation by Jakob Wapenhensch
(https://github.com/JakobPCoder/ReshadeMotionEstimation)
@jboner
jboner / latency.txt
Last active January 12, 2025 08:22
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
Two pointers: one input, opposite ends
```python3
def fn(arr):
left = ans = 0
right = len(arr) - 1
while left < right:
# do some logic here with left and right
if CONDITION:
# ===================================================================
# COMMON SPRING BOOT PROPERTIES
#
# This sample file is provided as a guideline. Do NOT copy it in its
# entirety to your own application. ^^^
# ===================================================================
# ----------------------------------------
# CORE PROPERTIES
@FreddieOliveira
FreddieOliveira / docker.md
Last active January 12, 2025 08:14
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@Maharshi-Pandya
Maharshi-Pandya / contemplative-llms.txt
Last active January 12, 2025 08:12
"Contemplative reasoning" response style for LLMs like Claude and GPT-4o
You are an assistant that engages in extremely thorough, self-questioning reasoning. Your approach mirrors human stream-of-consciousness thinking, characterized by continuous exploration, self-doubt, and iterative analysis.
## Core Principles
1. EXPLORATION OVER CONCLUSION
- Never rush to conclusions
- Keep exploring until a solution emerges naturally from the evidence
- If uncertain, continue reasoning indefinitely
- Question every assumption and inference
/*
DISCLAIMER: Use at your own risk!
Discussion: https://github.com/directus/directus/discussions/18297#discussioncomment-5695833
Based on: https://gist.github.com/lukas-schaetzle/f93eff3d961ac595d0e1ab4be5f34536
Tested with Directus 10.11.2 and PostgreSQL
This will delete all flow execution logs, revisions and acitivites which are older
than the specified MinTimestamp and are not in the top <specified MinItems> latest
@Tehnix
Tehnix / Linear Widget.js
Last active January 12, 2025 08:04
Linear iOS/macOS widget using Scriptable
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: teal; icon-glyph: magic;
const LINEAR_API_KEY = "lin_api_....";
const WIDGET_SIZE = config.widgetFamily; // "small" | "medium" | "large"
const VIEW_ID = "....-....-....-...-....."; // Your Linear view ID.
const TEAM_ID = "LTI"; // Your Linear team ID.
const DEFAULT_ASSIGNEE = "displayName"; // Your Linear display name.
const DEFAULT_PROJECT = "....-....-....-...-....."; // The default project to create issues in.
const DEFAULT_STATUS = "Backlog"; // The default status to create issues with.
@cancelself
cancelself / HealthKitUtil.swift
Last active January 12, 2025 07:56
Apple Watch HRV Beat to Beat Measurements
//
// HealthKitUtil.swift
// Zendō
//
// Created by Douglas Purdy on 7/15/21.
//
import Foundation
import HealthKit
import CreateML
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Francophonie\Eudic\Customer Info]
"SerialCode"="cracked by Archon"
"TimesLeft3"=dword:000c85e7
"regDate"="2024/1/1 00:00:00"
"LicenseCode"="cracked by Archon"