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 / .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 / 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 / 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 / SignInForm.js
Created January 13, 2022 08:16
Debug Component Mount Lifecycle
import { useMountDebug } from './useMountDebug';
function SignInForm(props) {
useMountDebug('SignInForm');
return (<div></div>)
}
@longseespace
longseespace / README.md
Created September 8, 2021 05:46 — forked from andreasonny83/README.md
Readme template

npm version code style: prettier

Project Name

Write a project description

Prerequisites

This project requires NodeJS (version 8 or later) and NPM.

@longseespace
longseespace / 2019-https-localhost.md
Created September 6, 2021 11:13 — forked from cecilemuller/2019-https-localhost.md
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

Verifying my Blockstack ID is secured with the address 192WVK6hX8xVsFZQrB3bDU7YnR1z3VVr4i https://explorer.blockstack.org/address/192WVK6hX8xVsFZQrB3bDU7YnR1z3VVr4i
@longseespace
longseespace / install.sh
Last active February 14, 2017 10:57
install eh script
#!/usr/bin/env bash
set -e
if [[ ! -d "${HOME}/.eh" ]]; then
git clone --recursive -j4 git@github.com:Thinkei/dev-env.git ${HOME}/.eh
else
(cd ${HOME}/.eh && git fetch --all && git reset --hard origin/master)
fi
@longseespace
longseespace / install.log
Created April 23, 2015 17:23
buck install antennapod
buck install //:antennapod -v 10
Using buckd.
[-] PARSING BUCK FILES...FINISHED 0.2s
Creating a build with 10 threads.
rm -r -f /Users/mrnhim/Desktop/AntennaPod/buck-out/bin/__unpack_appcompat#aar_unzip__ && mkdir -p /Users/mrnhim/Desktop/AntennaPod/buck-out/bin/__unpack_appcompat#aar_unzip__
unzip /Users/mrnhim/Desktop/AntennaPod/libs/appcompat-v7-19.1.0.aar -d /Users/mrnhim/Desktop/AntennaPod/buck-out/bin/__unpack_appcompat#aar_unzip__
rm -r -f /Users/mrnhim/Desktop/AntennaPod/buck-out/gen/__dslv-res_text_symbols__ && mkdir -p /Users/mrnhim/Desktop/AntennaPod/buck-out/gen/__dslv-res_text_symbols__
rm -r -f /Users/mrnhim/Desktop/AntennaPod/buck-out/gen/__antennapod#gen_java_android_build_config_de_danoeh_antennapod__ && mkdir -p /Users/mrnhim/Desktop/AntennaPod/buck-out/gen/__antennapod#gen_java_android_build_config_de_danoeh_antennapod__
rm -r -f /Users/mrnhim/Desktop/AntennaPod/buck-out/gen/__build-config#gen_java_android_build_config__ && mkdir -p /Users/mrnhim/Desktop/AntennaPod/buck-out/gen/__build-conf
@longseespace
longseespace / gist:3937606
Created October 23, 2012 08:19
wp_rewrite hook
We couldn’t find that file to show.