Skip to content

Instantly share code, notes, and snippets.

View mlshv's full-sized avatar

Misha mlshv

View GitHub Profile
@mlshv
mlshv / publishing-flow.md
Last active February 24, 2026 19:22
BSF Publishing Flow — Solana dApp Store

BSF Publishing Flow

Участники

  • Android App — наше приложение на телефоне юзера
  • Phantom — кошелёк (отдельное приложение на телефоне, вызывается через MWA)
  • Publishing Service — наш сервер на Hetzner
  • Solana — блокчейн
  • dApp Store Portal — портал Solana Mobile для ревью
@mlshv
mlshv / .mcp.json
Created February 17, 2026 15:05
Claude Code + Codex Dual Review
{
"mcpServers": {
"codex": {
"type": "stdio",
"command": "codex",
"args": ["mcp-server"]
}
}
}
@mlshv
mlshv / loop.cjs
Created January 26, 2026 17:19
ralph loop on beads
#!/usr/bin/env node
const { spawn, execSync } = require('child_process')
const args = process.argv.slice(2)
const INTERACTIVE = args.includes('-i')
const ISSUE_ID = args.find(a => a !== '-i')
if (!ISSUE_ID) {
console.log(`Usage: loop.cjs <beads-issue-id> [-i]
@mlshv
mlshv / loop.js
Created January 14, 2026 16:49
My Ralph Wiggum Loop
#!/usr/bin/env node
import { spawn } from 'child_process'
import fs from 'fs'
// tools that run without prompting
const ALLOWED_TOOLS = [
'Read',
'Write',
'Edit',
'Glob',
@mlshv
mlshv / pulley.html
Created December 4, 2025 09:34
collision detection with belt/pulley problem math in p5js
<!DOCTYPE html>
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lib/p5.min.js"></script>
<style>
body {
margin: 0;
overflow: hidden;
background: #000;
}
@mlshv
mlshv / Video.tsx
Last active January 14, 2025 06:15
Framer Video Component. Fixes iOS issues
// Welcome to Code in Framer
// Get Started: https://www.framer.com/developers
import { useEffect, useState } from "react"
import { addPropertyControls, ControlType } from "framer"
import { motion } from "framer-motion"
const isSafari = () => {
const ua = navigator.userAgent.toLowerCase()
return ua.includes("safari") && !ua.includes("chrome")
}
@mlshv
mlshv / SplashScreen.tsx
Created August 23, 2024 00:02
Framer splash screen code component
import { useEffect, useState } from "react"
import { addPropertyControls, ControlType } from "framer"
import { motion } from "framer-motion"
/**
* These annotations control how your component sizes
* Learn more: https://www.framer.com/developers/#code-components-auto-sizing
*
* @framerSupportedLayoutWidth auto
* @framerSupportedLayoutHeight auto
@mlshv
mlshv / create-hidpi-canvas.js
Created October 10, 2022 12:16
High DPI canvas that respects device pixel ratio
const PIXEL_RATIO = (() => {
const ctx = document.createElement('canvas').getContext('2d')
if (ctx) {
const dpr = window.devicePixelRatio || 1
const bsr =
ctx.webkitBackingStorePixelRatio ||
ctx.mozBackingStorePixelRatio ||
ctx.msBackingStorePixelRatio ||
ctx.oBackingStorePixelRatio ||
@mlshv
mlshv / mimc7.ts
Created August 22, 2022 08:52
MIMC7 hash implementation TypeScript
import bigInt, { BigInteger } from "big-integer";
const c = [
"0",
"20888961410941983456478427210666206549300505294776164667214940546594746570981",
"15265126113435022738560151911929040668591755459209400716467504685752745317193",
"8334177627492981984476504167502758309043212251641796197711684499645635709656",
"1374324219480165500871639364801692115397519265181803854177629327624133579404",
"11442588683664344394633565859260176446561886575962616332903193988751292992472",
"2558901189096558760448896669327086721003508630712968559048179091037845349145",
@mlshv
mlshv / find-and-replace.js
Last active October 6, 2021 16:17
Find and replace JavaScript function for arrays
export const replace = (array, index, value) => {
return [...array.slice(0, index), value, ...array.slice(index + 1)]
}
/**
* Finds and replaces an item inside an array
* @param {Array} array
* @param {Function} findPredicate Callback for Array.prototype.find
* @param {*|Function} replaceCallbackOrItem Any value: replaced value. Function: recieves old value as argument and should return a new value.
*