Skip to content

Instantly share code, notes, and snippets.

View datagutt's full-sized avatar
🐱

Thomas Lekanger datagutt

🐱
View GitHub Profile
@DavidBuchanan314
DavidBuchanan314 / r1_api.md
Last active July 24, 2024 12:01
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:

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 July 3, 2024 18:04
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 March 15, 2024 00:56
find all apps using Electron and their versions, on macOS systems
#!/usr/bin/env zsh
# patched versions for CVE-2023-4863: 22.3.24, 24.8.3, 25.8.1, 26.2.1
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
echo "App Name: $(basename ${app})"
electronVersion=$(strings "$filename" | grep "Chrome/" | grep -i Electron | grep -v '%s' | sort -u | cut -f 3 -d '/')
@TimonLukas
TimonLukas / ws-client.ts
Created August 12, 2023 19:06
TRPC custom message encoding in WebSocket
export class WsClient {
#socket: WebSocket
#listeners: {
open: ((event: Event) => any)[]
close: ((event: CloseEvent) => any)[]
error: ((event: Event) => any)[]
message: ((event: MessageEvent) => any)[]
} = {
open: [],
close: [],
@Digital39999
Digital39999 / kickPusherTypes.ts
Last active July 18, 2024 09:53
Keep in mind that some of those might also be partial.
export type PusherEvents = {
// 'channel.id';
channel: {
FollowersUpdated: {
followersCount: string | number
channel_id: number
username: unknown
created_at: number
followed: boolean
}
#!/bin/bash
# run this script by executing:
# wget https://gist.githubusercontent.com/rationalsa/803859153892a9278ad826aabb4276fe/raw/jetson_nano_flash_bootloader.sh
# bash jetson_nano_flash_bootloader.sh
BSP=https://developer.nvidia.com/downloads/remetpack-463r32releasev73t210jetson-210linur3273aarch64tbz2
VER=32.7.3
SHA256=3e7c304b56c2c9f2ca865d560d22e8ab3d99d2e79d782342fb0fb1c4a5e7946e