Skip to content

Instantly share code, notes, and snippets.

View datagutt's full-sized avatar
🐱

Thomas Lekanger datagutt

🐱
View GitHub Profile
@cr08
cr08 / gpio_installer.sh
Last active April 10, 2025 13:17
Belabox install script to add service for setting physical GPIO pins 15 and 40 to OUT and LOW for specific 4G/5G hats
#!/bin/bash
####################################
#
# This script is designed for use with the official Belabox images on the supported Rockchip RK3588 boards
# in combination with the SpotPear 4G/5G M.2 modem hats:
# https://spotpear.com/index.php/shop/Raspberry-Pi-M.2-4G-5G-GSM-GPRS-EDGE.html
#
# The Belabox image, at least on the Orange Pi 5 Plus, defaults available GPIO pins to IN with a pullup.
# Physical pins 15 and 40 tie to modem POWER and RESET pins with these hats and the defaults will keep
@adrienne
adrienne / mullenweg-wpe.md
Last active April 16, 2025 15:22
The Mullenweg/WPE Thing
@DavidBuchanan314
DavidBuchanan314 / r1_api.md
Last active April 10, 2025 16:35
Rabbit R1 Unofficial API Docs

The Rabbit R1 uses a few custom APIs to talk to The Cloud™. Almost nothing happens on-device, and all the AI magic happens on servers.

Consequently, you don't really need the physical device.

TLS Client Fingerprinting

In lieu of an authentication scheme, Rabbit's servers attempt to verify device authenticity by checking the TLS client's JA3 fingerprint, presumably enforced by AWS WAF.

If your TLS client doesn't match an expected fingerprint, you'll get HTTP 403 errors. This fingerprint works:

TC358743 Radxa Zero 3W Notes

Audio

tc358743-audio.dts overlay allows audio to be captured. I2S audio is a 48kHz sampling rate at 32 bit/sample.

Audio Formats

According to gstreamer, the following caps are supported. This seems to indicate that up to 8-channel audio (likely 7.1) capture is supported by the tc35874x driver. I haven't tested more than stereo, and haven't made sure it isn't just mono.

import { LexicalComposer } from '@lexical/react/LexicalComposer';
import { RichTextPlugin } from '@lexical/react/LexicalRichTextPlugin';
import { ContentEditable } from '@lexical/react/LexicalContentEditable';
import { HistoryPlugin } from '@lexical/react/LexicalHistoryPlugin';
import { AutoFocusPlugin } from '@lexical/react/LexicalAutoFocusPlugin';
import { HashtagPlugin } from '@lexical/react/LexicalHashtagPlugin';
import LexicalErrorBoundary from '@lexical/react/LexicalErrorBoundary';
import TreeViewPlugin from './plugins/TreeViewPlugin';
import ToolbarPlugin from './plugins/ToolbarPlugin';
import { HeadingNode, QuoteNode } from '@lexical/rich-text';
"workbench.editor.customLabels.patterns": {
"**/routes/**/+page.svelte": "${dirname(1)}/${dirname}",
"**/routes/**/+page.server.ts": "/${dirname} [server]",
"**/app/**/page.tsx": "${dirname}.${extname}",
"**/app/**/layout.tsx": "${dirname}/layout.${extname}"
}
@loonietoque
loonietoque / ultrawide-twitch-notes.md
Created January 31, 2024 19:51
Ultrawide on Twitch

Ultrawide Streaming Notes

When I am speaking on "ultrawide", I am usually referring to the common aspect ratio stated as "21:9".

I argue there is a case for content creation at 21:9 resolutions. Primarily,

  • Smartphones are a very common viewing device, and are ever-increasing in lengthier aspect ratios. Many creators already use 18:9 instead of 16:9 for this reason.
  • For desktops, folks are very rarely watching in fullscreen mode anyways
@khalidx
khalidx / node-typescript-esm.md
Last active April 15, 2025 14:15
A Node + TypeScript + ts-node + ESM experience that works.

The experience of using Node.JS with TypeScript, ts-node, and ESM is horrible.

There are countless guides of how to integrate them, but none of them seem to work.

Here's what worked for me.

Just add the following files and run npm run dev. You'll be good to go!

package.json

@Jamie-BitFlight
Jamie-BitFlight / esbuild-add-dynamic-require-shim.mjs
Created October 19, 2023 13:43
'Dynamic require of "os" is not supported' or 'Dynamic require of "fs" is not supported' etc - can esbuild load dynamic imports? Yes!
const ESM_REQUIRE_SHIM = `
await(async()=>{let{dirname:e}=await import("path"),{fileURLToPath:i}=await import("url");if(typeof globalThis.__filename>"u"&&(globalThis.__filename=i(import.meta.url)),typeof globalThis.__dirname>"u"&&(globalThis.__dirname=e(globalThis.__filename)),typeof globalThis.require>"u"){let{default:a}=await import("module");globalThis.require=a.createRequire(import.meta.url)}})();
`;
@april
april / find-all-electron-versions.sh
Last active February 7, 2025 17:01
find all apps using Electron and their versions, on macOS systems
# latest supported electron version as of october 2024
LATEST_SUPPORTED_VERSION=30
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m' # no color
mdfind "kind:app" 2>/dev/null | sort -u | while read app;
do
filename="$app/Contents/Frameworks/Electron Framework.framework/Electron Framework"
if [[ -f $filename ]]; then