Skip to content

Instantly share code, notes, and snippets.

static const char* const sourceDataPath = R"(C:\Temp\2remove\vectors.csv)";
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <chrono>
#include <immintrin.h>
#include <assert.h>
using namespace std;
using namespace std::chrono;
static const char* const sourceDataPath = R"(C:\Temp\2remove\vectors.csv)";
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <chrono>
#include <immintrin.h>
using namespace std;
using namespace std::chrono;
constexpr int SIZE = 640000;
// Configuration object for the search
const searchConfig = {
searchCriteria: { user: { id: true, email: true } }, // What we're looking for
maxDepth: 50, // How deep to search in the tree
stopAfterFirst: false, // Whether to stop after finding the first match
searchPaths: ["memoizedProps", "memoizedState"], // Where to look in each node
mainSelector: "#__next", // The root element of our React app
callback: (matchingObjects) => {
matchingObjects.forEach(({ matchingObject, fiberNode }) => {
console.log("Found matching object:", matchingObject);
import llama_cpp
import re
import json
# Model configuration
# tested with mistral, llama2, llama3, and phi3
model_path = "/path/to/model"
base_llm = llama_cpp.Llama(model_path, seed=42, n_gpu_layers=-1, n_ctx=4096, verbose=False, temperature=0.0)
@aiaf
aiaf / Apple-eDP-TCON.md
Created March 21, 2024 12:38
Partial List of Parade Technologies eDP Timing Controllers TCON used in Apple products
Max res.
Model Introduced eDP Rate Max input Panel depth
@kj800x
kj800x / Hacking the LG Monitor's EDID.md
Last active May 13, 2026 09:56
Hacking the LG Monitor's EDID

preface: Posting these online since it sounds like these notes are somewhat interesting based on a few folks I've shared with. These are semi-rough notes that I basically wrote for myself in case I ever needed to revisit this fix, so keep that in mind.

I recently bought an LG ULTRAGEAR monitor secondhand off of a coworker. I really love it and it's been great so far, but I ran into some minor issues with it in Linux. It works great on both Mac and Windows, but on Linux it displays just a black panel until I use the second monitor to go in and reduce the refresh rate down to 60 Hz.

This has worked decent so far but there's some issues:

  • It doesn't work while linux is booting up. The motherboards boot sequence is visible just fine, but as soon as control is handed over to Linux and I'd normally see a splash screen while I'm waiting for my login window, I see nothing.
  • It doesn't work on the login screen. This would be fine if login consistently worked on my second screen, but I need to manually switch
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gunhaxxor
gunhaxxor / client.ts
Last active May 28, 2023 08:56
TRPC adapter for uWebsockets.js. The ws-adapter is a modified version of the original ws-adapter in the TRPC repo. Also added some utility functions to make it easier to setup subscriptions that don't send data to the triggering client.
import {
createTRPCProxyClient,
createWSClient,
wsLink,
} from '@trpc/client';
import { Unsubscribable } from '@trpc/server/observable';
import AbortController from 'abort-controller';
import fetch from 'node-fetch';
import ws from 'ws';
import type { AppRouter } from './server';
@WebReflection
WebReflection / esx.md
Last active October 6, 2024 12:35
Proposal: an ESX for JS implementation
@smjonas
smjonas / inc_rename.lua
Last active March 1, 2023 14:45
Incremental LSP rename command based on Neovim's command-preview feature
-- Usage: type :IncrementalRename <new_name> while your cursor is placed above an identifier (LSP must be enabled)
-- Update: this gist will no longer be updated since this command has been turned into a plugin!
-- You can find the plugin here: https://github.com/smjonas/inc-rename.nvim
local state = {
added_lines = false,
orig_lines = {},
lsp_positions = {},
}