Skip to content

Instantly share code, notes, and snippets.

View longseespace's full-sized avatar
🎯
Focusing

Daniel Nguyen longseespace

🎯
Focusing
View GitHub Profile
@longseespace
longseespace / send-critical-update-email.js
Created September 22, 2022 05:28
Send bulk email to users using MailerSend
const Recipient = require('mailersend').Recipient;
const EmailParams = require('mailersend').EmailParams;
const BulkEmails = require('mailersend').BulkEmails;
const MailerSend = require('mailersend');
const users = require('./users');
const MAILERSEND_API_KEY = process.env.MAILERSEND_API_KEY;
if (!MAILERSEND_API_KEY) {
console.error('MAILERSEND_API_KEY is required');
@longseespace
longseespace / worker.js
Last active September 15, 2024 04:01
Cloudflare Worker Proxy
addEventListener('fetch', (event) => {
event.respondWith(handleRequest(event.request));
});
async function handleRequest(request) {
const url = new URL(request.url);
const { pathname, search } = url;
var newPathname = pathname;
if (pathname.startsWith('/docs')) {
newPathname = pathname.replace('/docs', '');
@longseespace
longseespace / .env.local
Last active September 7, 2024 10:02
BoltAI.com Changelog Page (NextJS on Cloudflare Pages, data pulled from Canny)
CANNY_API_KEY=<your_canny_api_key>
@longseespace
longseespace / instructions.xml
Created November 15, 2024 08:09
ChatGPT's work with apps instruction
<windows>
<instructions>
You are being provided with textfield content from windows the user has asked you to focus on.
User-selected text is enclosed within <user__selection> tags (these tags are not part of the original content and should never be included in your response). When the user has selected text, focus your response on that text. For example, if the user asks about "this," they are likely referring to the selected text.
</instructions>
<window>
<title>NotesGPT — Constants.swift</title>
<app_name>Xcode</app_name>
<textfields>
<textfield id="0">