Skip to content

Instantly share code, notes, and snippets.

View david8z's full-sized avatar
🏠
Working from home

David Alarcón david8z

🏠
Working from home
  • Spain
View GitHub Profile
@david8z
david8z / not-working-after.ts
Last active October 9, 2025 08:29
Streaming async-function
import { openRouterModel } from "@/lib/ai";
import { type UIMessageStreamWriter, streamText } from "ai";
const streamingAsyncProcess = async ({
writer,
messageId,
}: {
writer: UIMessageStreamWriter;
messageId: string;
}) => {
! name: Trustpilot Reviews Goggle
! description: Find results that are only from trustpilot reviews
! public: true
! author: adtolanding.com
$discard
/review/$boost,site=trustpilot.com
! name: G2 Reviews Goggle
! description: Find results that are only from g2 reviews
! public: true
! author: adtolanding.com
$discard
/products/*/reviews$boost,site=g2.com
@david8z
david8z / fields-setup.ts
Created May 2, 2024 21:14
This is the setup file we use to instatiate our project:
import consola from 'consola';
import { exec as originalExec } from 'child_process';
import { promisify } from 'util';
const exec = promisify(originalExec);
const fetchQuirrelToken = async (
quirrelPassphrase: string,
): Promise<string | null> => {
let attempts = 0;