Skip to content

Instantly share code, notes, and snippets.

View volkyeth's full-sized avatar
building infrastructure for insights

Volky volkyeth

building infrastructure for insights
View GitHub Profile
@juancampa
juancampa / arrange.rs
Created January 30, 2025 07:18
Force directed algorithm to solve rect overlaps
fn arrange(&self, ui: &mut Ui, state: &mut DashboardState, repulsion_steps: usize, compaction_steps: usize) {
if state.block_rect.is_empty() {
return;
}
let original = state.block_rect.clone();
let mut debug_copy = state.block_rect.clone();
let rects = &mut state.block_rect;
let keys: Vec<BlockKey> = rects.keys().collect();
let keys = keys.iter().copied();
@danromero
danromero / token.js
Last active September 26, 2024 00:25
Generate an Application Bearer Token from a Farcaster custody address mnemonic for Merkle v2 API
const ethers = require('ethers');
const canonicalize = require('canonicalize');
const https = require('https');
const myMnemonic = 'a b c d e f g h i j k';
async function run() {
// WARNING: Example only -- do not ever hard-code your real mnemonic!
wallet = ethers.Wallet.fromMnemonic(myMnemonic);
@sindresorhus
sindresorhus / esm-package.md
Last active March 6, 2025 00:38
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@jesstelford
jesstelford / 01-shape-up-to-kindle.md
Last active February 1, 2025 20:46
Read SHAPE UP by basecamp on a Kindle / reMarkable / eReader

Read Shape Up by basecamp on a kindle / reMarkable / eReader

Basecamp's new book Shape Up is now available online (https://basecamp.com/shapeup) to read page-by-page.

There is a .pdf version, but that's not the best format for Kindle / other eReaders. Instead, we can convert the page-by-page into an eReader friendly format.

Part 1: Convert to a single page

NOTE: This has only been tested on Chrome

@ipan
ipan / diff-jq.md
Created January 16, 2018 04:47
compare two JSONs with jq #json #jq
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active March 6, 2025 03:55 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Exporting your 2FA tokens from Authy to transfer them into another 2FA application

IMPORTANT - Update regarding deprecation of Authy desktop apps

Past August 2024, Authy stopped supported the desktop version of their apps:
See Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August for details.

And indeed, after a while, Authy changed something in their backend which now prevents the old desktop app from logging in. If you are already logged in, then you are in luck, and you can follow the instructions below to export your tokens.

If you are not logged in anymore, but can find a backup of the necessary files, then restore those files, and re-install Authy 2.2.3 following the instructions below, and it should work as expected.

@StevenACoffman
StevenACoffman / _MicroService Proxy Gateway Solutions.md
Last active July 15, 2024 05:12
Microservice Proxy/Gateway Solutions

MicroService Proxy Gateway Solutions

Kong, Traefik, Caddy, Linkerd, Fabio, Vulcand, and Netflix Zuul seem to be the most common in microservice proxy/gateway solutions. Kubernetes Ingress is often a simple Ngnix, which is difficult to separate the popularity from other things.

Github Star Trend:

Github Star History for Kong vs traefik vs fabio vs caddy vs Zuul

This is just a picture of this link from March 2, 2019

Originally, I had included some other solution