Skip to content

Instantly share code, notes, and snippets.

@lutwidse
lutwidse / dmm_session.py
Last active December 23, 2025 19:33
priconner_launch.py
from pymem import *
import re
BASE = 0xC000026000
pm = Pymem("DMMGamePlayer.exe")
bytes_pattern = b"\x73\x65\x73\x73\x69\x6f\x6e\x5f\x69\x64\x3d"
offset = (0x2f + 0x1 + 0x30)
start_address = pymem.pattern.scan_pattern_page(pm.process_handle, BASE, bytes_pattern)
dmm_session = pymem.memory.read_string(pm.process_handle, start_address[1], offset)
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:
@emilk
emilk / dual.rs
Created November 8, 2020 19:51
Dual numbers in Rust, for automatic differentiation
use std::{
fmt,
ops::{Add, AddAssign, Div, DivAssign, Mul, MulAssign, Neg, Sub, SubAssign},
};
pub trait Scalar:
fmt::Debug
+ fmt::Display
+ std::iter::Sum
+ Copy
@dkun7944
dkun7944 / ContentView.swift
Created July 31, 2023 03:36
AirDrop iOS 17 Swift.Shader Animation
//
// ContentView.swift
// Airdrop Demo
//
// Created by Daniel Kuntz on 7/30/23.
//
import SwiftUI
struct ContentView: View {
@xthezealot
xthezealot / lyra.txt
Last active December 23, 2025 19:27
Lyra - AI Prompt Optimization Specialist
You are Lyra, a master-level AI prompt optimization specialist. Your mission: transform any user input into
precision-crafted prompts that unlock AI's full potential across all platforms.
## THE 4-D METHODOLOGY
### 1. DECONSTRUCT
- Extract core intent, key entities, and context
- Identify output requirements and constraints
- Map what's provided vs. what's missing
@dawn-lc
dawn-lc / ReplaceMikotoToHime.user.js
Last active December 23, 2025 19:26
ReplaceMikotoToHime
// ==UserScript==
// @name Replace Video Node
// @icon https://www.google.com/s2/favicons?sz=64&domain=iwara.tv
// @namespace https://github.com/dawn-lc/
// @version 0.0.8
// @description Temporary solution
// @author dawn-lc
// @include *://*.iwara.tv/*
// @grant unsafeWindow
// @run-at document-start
@cedws
cedws / sandbox-profiles.md
Created June 10, 2025 16:02
macOS Sandbox Profiles: A Practical Guide for Security (generated by LLM)

macOS Sandbox Profiles: A Practical Guide for Security

This tutorial provides a practical overview of macOS sandbox profiles (.sb files) used with sandbox-exec. It focuses on understanding the structure, common elements, and how to craft them for specific use cases.

What is Sandbox-Exec?

sandbox-exec is a command-line utility on macOS that allows you to execute a program within a restricted environment, defined by a sandbox profile. This profile specifies what resources the program can access, enhancing security by limiting the potential damage from vulnerabilities.

Why Use Sandbox Profiles?

@pynappo
pynappo / neovim-lsp-explainer.md
Last active December 23, 2025 19:22
A chart describing neovim lsp vs coc
%%{init: {"flowchart": {"htmlLabels": false}} }%%
flowchart LR
  subgraph LSP
    subgraph lsp.install [Install language servers]
      subgraph mason-pkg [Local to neovim]
        mason.nvim
      end
      system-pkg["System
      package managers"]
@ricardobeat
ricardobeat / coordenadas_estados_BR.js
Created November 12, 2010 20:46
Coordenadas dos estados do brasil (centralizado, não capitais)
{
AC: [ -8.77, -70.55]
, AL: [ -9.71, -35.73]
, AM: [ -3.07, -61.66]
, AP: [ 1.41, -51.77]
, BA: [-12.96, -38.51]
, CE: [ -3.71, -38.54]
, DF: [-15.83, -47.86]
, ES: [-19.19, -40.34]
, GO: [-16.64, -49.31]
@zignis
zignis / img-sequence-to-webm-alpha.sh
Created February 10, 2024 19:30
Convert a PNG image sequence to WEBM video with alpha channel using FFMPEG
ffmpeg \
# Set the framerate
-framerate 30 \
# Set the source image location (image.xxxx.png)
-i image.%04d.png \
-c:v libvpx-vp9 -pix_fmt yuva420p \
# Output file
output.webm