Skip to content

Instantly share code, notes, and snippets.

View goncharov's full-sized avatar
🤔

Stanislav Goncharov goncharov

🤔
View GitHub Profile
@arianvp
arianvp / SSH_MACOS_SECURE_ENCLAVES.md
Last active January 20, 2026 11:10
Native Secure Enclaved backed ssh keys on MacOS

Native Secure Enclave backed ssh keys on MacOS

It turns out that MacOS Tahoe can generate and use secure-enclave backed SSH keys! This replaces projects like https://github.com/maxgoedjen/secretive

There is a shared library /usr/lib/ssh-keychain.dylib that traditionally has been used to add smartcard support to ssh by implementing PKCS11Provider interface. However since recently it also implements SecurityKeyProivder which supports loading keys directly from the secure enclave! SecurityKeyProvider is what is normally used to talk to FIDO2 devices (e.g. libfido2 can be used to talk to your Yubikey). However you can now use it to talk to your Secure Enclave instead!

Dragon Age Origins on the Steam Deck in 2023

Steam Deck

Origins runs with no problems at all when installed through Steam on the Deck. Steam installs all the required dependencies like physx for you. Haven't tried the GoG or EA versions and don't plan to - but they may require you to install those dependencies yourself going from what I see on the net. Use Protontricks and protontricks-launch to do this.

The game uses a lot of power by default, but a few tweaks will reduce this dramatically and give over 4.5 hours on a single charge.

@valex91
valex91 / autoEA.sh
Created May 7, 2023 09:39
Update emudeck yuzu image to latest EA
#!/bin/bash
tagName=$(curl --silent "https://api.github.com/repos/pineappleEA/pineapple-src/releases/latest" |
grep '"tag_name":' |
sed -E 's/.*"([^"]+)".*/\1/')
curl -JLO "https://github.com/pineappleEA/pineapple-src/releases/download/${tagName}/Linux-Yuzu-${tagName}.AppImage"
mv -f "Linux-Yuzu-${tagName}.AppImage" $HOME/Applications/yuzu.AppImage
type CountTo<N extends number, S extends 0[] = []> = S["length"] extends N
? S
: CountTo<N, [...S, 0]>;
type Inc<N extends number> = [...CountTo<N>, 0]["length"];
type Dec<N extends number> = CountTo<N> extends [infer _H, ...infer T]
? T["length"]
: 0;
type Before<
Memory extends number[],
@GodderE2D
GodderE2D / discord_official_domains.md
Created September 7, 2021 09:48
List of Discord Official Web Domains

Discord Official Web Domains

Listed below are the web domains that Discord currently own. If you see a link sending you to a domain that claims is a "Discord owned website", check if it is one of the below domain names! If it's not, assume it's a scam and report it.

Note: This is not an exhaustive list, there may be some missing domains that Discord owns, but there are no domains listed here that aren't owned by Discord.

@andrewssobral
andrewssobral / disable_leds_rpi3.sh
Last active November 29, 2025 10:21
Disable leds on Raspberry Pi 3 Model B Rev 1.2
# https://raspberrypi.stackexchange.com/questions/117632/turn-off-external-leds-on-raspberry-pi-3
# check model
cat /sys/firmware/devicetree/base/model
# Raspberry Pi 3 Model B Rev 1.2
# Disable Power (red) and Activity (yellow) leds
sudo nano /etc/rc.local
# Add the following lines before `exit 0`:
sudo sh -c 'echo none > /sys/class/leds/led0/trigger'

Route Transition API

Definitions

The goal of the route transition API is to enable suspense-like transition in React Router without using Suspense (much like v1).

On location changes, React Router will continue to send down the old location, activating pending hooks for loading states and optimistic UI, and wait for your Route's preloading hooks to resolve before sending down the new location and updating your app.

This enables you to declare data dependencies on your routes, allowing your route elements to expect data and not need to manage their own loading states.

@gullyn
gullyn / flappy.html
Last active November 19, 2025 15:40
Flappy bird in 205 bytes (improved!)
<body onload=z=c.getContext`2d`,setInterval(`c.width=W=150,Y<W&&P<Y&Y<P+E|9<p?z.fillText(S++${Y=`,9,9|z.fillRect(p`}*0,Y-=--M${Y+Y},P+E,9,W),P))):p=M=Y=S=6,p=p-6||(P=S%E,W)`,E=49) onclick=M=9><canvas id=c>
@l3nz
l3nz / README.md
Last active June 7, 2025 16:18
NOT Fixed: accountsd using 400% CPU on MacOS Catalina 10.15.7 (19H2)

accountsd using 400% CPU on MacOS Catalina 10.15.7 (19H2)

TL;DR: Still open - see below.

This morning I woke up to some not-so-nice surprise - my 2018 MPB 13" would be kind of totally unusable. The accountsd process was stable at 400%, battery was going like ice-cream in the Sahara, and opening up LibreOffice was like a major achievement.

I did check the logs (that were growing at like 500 lines per second) and I saw a lot of lines at FAULT level:

fault 07:54:04.271342+0200 accountsd Unentitled access by client 'CallHistoryPlugi' (selector: accountsWithAccountType:handler:)