Skip to content

Instantly share code, notes, and snippets.

View lumenwrites's full-sized avatar

lumenwrites lumenwrites

View GitHub Profile
{
"@context": "https://www.w3.org/ns/activitystreams",
"type": "Create",
"id": "https://chatty.example/ben/p/51086",
"to": ["https://social.example/alyssa/"],
"inReplyTo": "https://social.example/alyssa/posts/49e2d03d-b53a-4c4c-a95c-94a6abf45a19",
"author": "https://chatty.example/ben/",
"object": {
"type": "Note",
"id": "https://chatty.example/ben/p/51085",
{
"@context": "https://www.w3.org/ns/activitystreams",
"type": "Create",
"id": "https://social.example/alyssa/posts/9282e9cc-14d0-42b3-a758-d6aeca6c876b",
"to": ["https://social.example/alyssa/followers/",
"https://www.w3.org/ns/activitystreams#Public"],
"author": "https://social.example/alyssa/",
"object": {
"type": "Note",
"id": "https://social.example/alyssa/posts/d18c55d4-8a63-4181-9745-4e6cf7938fa1",
@lumenwrites
lumenwrites / 0. About.txt
Last active November 29, 2021 17:44
Vercel Throttling Issue
1. index.tsx has getServerSideProps() function which calls a getPosts() function to fetch the posts.
2. get-posts.ts runs a prisma query and fetches the posts.
3. it uses prismaClient
@lumenwrites
lumenwrites / usingpusher.tsx
Created January 17, 2022 19:20
Pusher useEffect
useEffect(() => {
// Pusher.logToConsole = true
let pusher = new Pusher(process.env.NEXT_PUBLIC_PUSHER_KEY, {
cluster: process.env.NEXT_PUBLIC_PUSHER_CLUSTER,
})
window.onbeforeunload = function () {
pusher.disconnect()
}
let channel = pusher.subscribe('story-engine')
channel.bind('place-card', function (data) {

Many startups post articles to Hacker News in the hope of getting the community's attention. Most don't get far. They're either about topics that HN readers don't find interesting, or they're structured in a way that loses the audience. It's dismaying to see these because I can feel how much work people put into them and how disappointed they are when they sink from the /newest page without a trace. What a waste!

Below is a bunch of advice I've given to YC startups who've struggled with this over the years. The bulk of this article has been copied from old emails. Eventually I'll wrangle it into something publishable.