Skip to content

Instantly share code, notes, and snippets.

View PieterT2000's full-sized avatar

Pieter PieterT2000

View GitHub Profile
@PieterT2000
PieterT2000 / README.md
Last active February 4, 2021 15:19
Find out how much time you spent on YouTube

Find how much time you spent (wasted?) on YouTube

For MAC users

  1. cp ~/Library/Application\ Support/Google/Chrome/Default/History temp_folder/
  2. Open file in a database viewer (e.g. TablePlus) and run the SQL query found in script.sql.

Note: you will need to copy the file to a temporary location since it's locked when you try to load it into a viewer from it's original location.

@PieterT2000
PieterT2000 / README.md
Last active January 20, 2025 13:27
How to fix stuck Wormhole Claim transactions due to timeouts

How to fix stuck Wormhole Claim transactions due to timeouts

Context

When you bridge USDC from Sui (or any other source chain) to Solana using the Wormhole bridge, there are two stages:

  1. Burning the token on the source chain
  2. Claiming, minting the token on the destination chain (Solana in this case). This step involves an actual transaction on the Solana blockchain. The bridging process can pause between the steps, and in that case you can later use the "Resume transaction" section on the Portalbridge DApp to complete the transaction and claim the tokens on the destination chain. image
@PieterT2000
PieterT2000 / ChatRuntimeProvider.tsx
Last active February 21, 2025 18:50
HOWTO: use a custom Streaming REST API with assistant-ui from scratch
import { ReactNode } from "react";
import {
AssistantRuntimeProvider,
useLocalRuntime,
type ChatModelAdapter,
} from "@assistant-ui/react";
import { parseEventChunk } from "./sse-util";
import { generateStream } from "./stream-utils";