Skip to content

Instantly share code, notes, and snippets.

View Slokh's full-sized avatar
👾

Kartik Slokh

👾
View GitHub Profile
@Slokh
Slokh / route.ts
Created June 19, 2024 21:40
discover farcaster users based on who you follow
import {
UserDataType,
getSSLHubRpcClient,
utf8StringToBytes,
} from "@farcaster/hub-nodejs";
import { NextRequest } from "next/server";
const client = getSSLHubRpcClient(process.env.HUB_RPC_ENDPOINT as string);
export async function GET(request: NextRequest) {
@Slokh
Slokh / script.py
Last active January 24, 2022 22:02
from api.lib.tasks.index_objects import index_objects
from api.lib.utils.list_utils import chunks
from api.lib.utils import get_logger
logger = get_logger()
start = datetime(2021, 11, 30, 17, 0)
end = datetime(2021, 11, 30, 17, 50)
asset_ids_created = AssetEvent.objects.using(settings.DB_REPLICA_LONG_QUERIES).filter(event_timestamp__gte=start, event_timestamp__lte=end, event_type="created").order_by('total_price').values('asset_id').distinct()
@Slokh
Slokh / critters.json
Created April 6, 2020 22:43
Animal Crossing: New Horizons Critters (Insects + Fish)
[
{
"type": "insect",
"name": "Common Butterfly",
"price": 160,
"location": "Above Flowers",
"time": {
"start": 4,
"end": 19
},