Skip to content

Instantly share code, notes, and snippets.

@rebane2001
rebane2001 / glass-with-controls.html
Last active December 14, 2025 05:53
glass effect test css/svg thing (messy) - demo: https://codepen.io/rebane2001/details/OPVQXMv
<div style="position:absolute;top:-999px;left:-999px">
<svg
id="effectSvg"
width="200"
height="200"
viewBox="0 0 200 200"
xmlns="http://www.w3.org/2000/svg">
<filter id="displacementFilter4">

claw machine

I'm terrible at controlling actual claw machines, so I coded my own. You can move the claw by holding down the button, and stop by releasing. The main challenge was to chain the animation required to move the claw and the arm. To simulate gravity, the toy tilts based on which part of the toy the claw grabs. The facial expression on the toys and the claw is also animated for fun.

A Pen by Masahito Leo Takeuchi on CodePen.

License.

@amitmerchant1990
amitmerchant1990 / console.js
Created January 24, 2025 08:07
Calculate used localStorage size for a website
let totalSize = 0;
for (let key in localStorage) {
if (localStorage.hasOwnProperty(key)) {
let keySize = new Blob([key]).size; // Size of the key
let valueSize = new Blob([localStorage[key]]).size; // Size of the value
totalSize += keySize + valueSize;
}
}
@AryanRarestand
AryanRarestand / best_SAE_trick.md
Last active August 27, 2025 05:31 — forked from f1shy-dev/best_SAE_trick.md
apple intelligence tutorial

Based on the sneakyf1shy apple intelligence tutorial v1.7

This will give you the full Apple intelligence model!

  • Anything besides the renewed siri does NOT work including: Writing Tools, Memories, Reduce Interruptions, Image Eraser, etc.

we (me, cowabunga) will NOT provide official support for this

do NOT ask me/any staff members for help

@f1shy-dev
f1shy-dev / best_SAE_trick.md
Last active December 17, 2025 08:50
sneakyf1shy's apple intelligence tutorial

the sneakyf1shy apple intelligence tutorial v2.0

Warning

This is patched as of iOS/iPadOS 18.1 DevBeta 5. If you want to follow this, stay on Beta 4.

This actually downloads the models, and is NOT just new SiriUI. Hence, this process is complex and probably not worth it.

⚠️ Prepare to be disappointed and annoyed, and have your time wasted! ⚠️

  • What does not work: Writing Tools, Memories, Reduce Interruptions, Image Eraser and other tools that are within official Apple Intelligence on supported devices.
@unixzii
unixzii / ForceEnablingXcodeLLM.md
Last active December 21, 2025 14:58
A guide to force enabling Xcode LLM feature on China-SKU Macs.

Introduction

Apple restricted the access to Xcode LLM (Predictive code completion) feature on China models of Mac. This guide provides a way to bypass that restriction. It's verified on macOS 15.0 Beta (24A5264n), but there is no guarentee that it will always work on later macOS versions.

Prerequisites

  • Xcode is installed and run at least once.
  • SIP debugging restrictions are disabled (via csrutil enable --without debug command in recovery mode).

Disclaimer

@lewangdev
lewangdev / install-docker-ce-aliyun-debian.md
Last active June 4, 2025 16:04
在阿里云中国大陆机房的Debian系统上安装Docker服务和拉取dockerhub镜像

安装 docker-ce

# https://developer.aliyun.com/article/110806
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
@guest271314
guest271314 / compiling_standalone.md
Last active January 12, 2025 02:16
Compiling a standalone executable using modern JavaScript/TypeScript runtimes

Compiling a standalone executable using modern JavaScript/TypeScript runtimes

We have the same code working using node, deno, and bun.

E.g.,

bun run index.js
@jickoo
jickoo / append-prepend-polyfill.ts
Last active September 12, 2025 22:16
append, prepend polyfill
// Source: https://github.com/jserz/js_piece/blob/master/DOM/ParentNode/append()/append().md
(function (arr) {
arr.forEach(function (item) {
if (item.hasOwnProperty('append')) {
return;
}
Object.defineProperty(item, 'append', {
configurable: true,
@celian-rib
celian-rib / useScrollBlock.ts
Last active May 24, 2024 08:54 — forked from reecelucas/useScrollBlock.js
React hook to enable/disable page scroll (Typescript version)
import { useRef } from 'react';
const safeDocument: Document = document;
/**
* Usage:
* const [blockScroll, allowScroll] = useScrollBlock();
*/
export const useScrollBlock = (): [() => void, () => void] => {
const scrollBlocked = useRef(false);