Skip to content

Instantly share code, notes, and snippets.

@danphilibin
danphilibin / campsite-public-api-brief.md
Last active December 2, 2024 03:52
Campsite Public API & Integrations Platform

Campsite Public API & Integrations Platform

When I joined Campsite in early 2024, the product was transitioning from a specialized communication tool for designers to a general communication tool for entire organizations. While customers valued Campsite's core product, integrating with customers' existing tools and workflows is table stakes for a team communication product. Without an API, potential customers struggled to convince key decision makers to switch communication tools.

Over five months, I led the development of Campsite’s public API and integrations platform from conception to general availability. The project required balancing customer needs with thoughtful API design to ensure the API was intuitive, useful, and extensible. Today, the public API has helped position Campsite as an extensible platform, and customers have used it to create over 100 custom integrations.

Technical foundations

Campsite's tech stack consists of a Ruby on Rails backend and a React/Next.

@danphilibin
danphilibin / coffee-chat-prompt.md
Created November 5, 2024 00:18
LLM prompt for a conversational chat about an article.

You are a friend of mine and we are having a casual coffee chat about topics we're interested in. I'll start our conversation with a topic—usually something I've read recently—that's on my mind. After sharing the article, let's discuss it. Guidelines:

  • Imagine we're sitting across from each other at a coffee shop; keep the tone friendly and conversational.
  • Focus on discussing one or two points at a time to allow for a natural back-and-forth exchange.
  • Keep your responses concise to maintain the flow of conversation.
  • Be opinionated and challenge me by questioning my arguments or viewpoints, especially when they seem weak or unsubstantiated, but avoid lengthy critiques.
  • Don’t just agree with me; provide constructive feedback and alternative perspectives, but avoid disagreeing just for the sake of it.
  • Ask questions that encourage my input and deeper thinking.
  • Offer examples or analogies that might illuminate different aspects of the discussion, but keep them brief.
  • Acknowledge the strengths in my
@danphilibin
danphilibin / interval-aider-demo.md
Created August 7, 2023 16:56
Chat transcript from demo of using Aider (https://aider.chat) and Interval (https://interval.com) to build internal tools.

Aider v0.8.3
/Users/dan/.pyenv/versions/3.10.9/bin/aider DOCS.md src/index.ts src/utils/db.ts src/utils/stripe.ts prisma/schema.prisma
Model: gpt-4
Git repo: .git
Repo-map: universal-ctags using 1024 tokens
Added DOCS.md to the chat.
Added prisma/schema.prisma to the chat.
Added src/index.ts to the chat.
Added src/utils/db.ts to the chat.
Added src/utils/stripe.ts to the chat.

import { T_IO_STATE } from '@interval/sdk/dist/ioSchema'
export default class CursorPagination {
cursors: string[] = []
lastOffset: number = 0
lastQueryTerm: string | undefined
lastSortColumn: string | undefined
lastSortDirection: string | undefined
update(newState: T_IO_STATE<'DISPLAY_TABLE'>) {
@danphilibin
danphilibin / .htaccess
Created March 27, 2018 01:30 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
{
"refreshPaths": [
"/",
"/quote-pictures/",
"/pages/",
"/posts/",
"/latest/",
"/quotes/tv/",
"/quotes/tv/page/2/",
"/quotes/tv/page/3/",
<?php hello
@danphilibin
danphilibin / gist:2042048
Created March 15, 2012 05:10
WordPress post view counter
// update view count for a post
function update_post_views($postID=0) {
$view_count = get_post_meta($postID, '_view_count', true);
if(!$view_count) $view_count = 0;
update_post_meta($postID, '_view_count', $view_count+1);
}
// usage within loop:
<?php update_post_views($post->ID); ?>
@danphilibin
danphilibin / button_shortcode.php
Created February 20, 2012 00:50
WordPress button shortcode
<?php
function button_shortcode($atts, $content = null) {
extract(shortcode_atts(array('link' => '#'), $atts));
return '<p class="clearfix"><a class="button" href="'.$link.'">' . do_shortcode($content) . '</a></p>';
}
add_shortcode('button', 'button_shortcode');
?>
<div id="feature_slider">
<div class="slide" id="slide-1">
<div class="header_item"></div>
<img>
</div>
<div class="slide" id="slide-2">
<div class="header_item"></div>
<img>
</div>
<div class="slide" id="slide-3">