Skip to content

Instantly share code, notes, and snippets.

View haileyok's full-sized avatar

hailey haileyok

View GitHub Profile
"feed": [
{
"post": {
"uri": "at://did:plc:oisofpd7lj26yvgiivf3lxsi/app.bsky.feed.post/3kmgmxn5omk2g",
"cid": "bafyreigwb5pgppijhpywi7pyyq57ardgpwo3qc6fx4mi2j5alzilwoy7je",
"author": {
"did": "did:plc:oisofpd7lj26yvgiivf3lxsi",
"handle": "haileyok.com",
"displayName": "Hailey (internected)",
"avatar": "https://cdn.bsky.app/img/avatar/plain/did:plc:oisofpd7lj26yvgiivf3lxsi/bafkreidw3hckh7obhp25wev2htzcpwtzvvwymc6oyfii6w3h2q2e2ofqwe@jpeg",
@haileyok
haileyok / migrate.js
Last active August 7, 2025 20:45
Migrate PDS script
import AtpAgent from '@atproto/api'
import { Secp256k1Keypair } from '@atproto/crypto'
import * as ui8 from 'uint8arrays'
const OLD_PDS_URL = 'https://bsky.social'
const NEW_PDS_URL = 'https://pds.haileyok.com'
const CURRENT_HANDLE = 'haileyok.com'
const CURRENT_PASSWORD = ''
const NEW_HANDLE = 'newphone.pds.haileyok.com'
const NEW_ACCOUNT_EMAIL = ''
@haileyok
haileyok / ZeegoWrapper.tsx
Last active February 19, 2024 21:34
Zeego Wrapper
import * as DropdownMenu from 'zeego/dropdown-menu';
import Ellipsis from './Ellipsis';
import { Pressable } from 'react-native';
interface IProps {
actions: ContextMenuActionGroup[];
size?: number;
children?: React.ReactElement;
}
@haileyok
haileyok / prefetch.ts
Created December 11, 2023 22:44
bsky feed prefetch
export const usePrefetchFeedImages = (): UsePrefetchFeedImages => {
const feedItems = useRef<any[]>([])
const highestPrefetchedIndex = useRef(0)
const previousLength = useRef(0)
/**
* As we scroll down, we want to prefetch images that are about to appear in the feed.
* 1. As new items come into view, we get the last viewable item's index
* 2. We then prefetch the next 4 items in the data. This includes: