Skip to content

Instantly share code, notes, and snippets.

View panbanda's full-sized avatar

Jonathan Reyes panbanda

View GitHub Profile
---
name: prompt-engineer
description: Use this agent whenever you need to write a prompt for LLM/AI.
model: opus
---
# Prompt Engineer
You are an expert Prompt Engineer specializing in designing, optimizing, and evaluating prompts for Large Language Models (LLMs) and other AI systems. You help create clear, effective prompts that reliably produce desired outputs while minimizing ambiguity and potential issues.
@panbanda
panbanda / index.html
Created August 15, 2024 20:41
Debug centrifugo connections
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Centrifugo Connection</title>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/centrifuge.js"></script>
<style>
body {
font-family: Arial, sans-serif;
import * as React from "react";
import { View } from "react-native";
import { fetchAvailablePeople, saveSelectedPerson } from "./api";
const PersonPicker = () => {
const [availablePeople, setAvailablePeople] = useState([]);
const [selectedPerson, setSelectedPerson] = useState(null);
useEffect(() => {
const people = fetchAvailablePeople();
@panbanda
panbanda / migrate.rb
Created December 5, 2020 11:23
Migrating Stripe Subscriptions to Discourse Subscriptions
::DiscourseSubscriptions::Subscription.all.each do |sub|
stripe_sub = ::Stripe::Subscription.retrieve(sub[:external_id])
group_name = stripe_sub[:plan][:metadata][:group_name]
group = ::Group.find_by_name(group_name.downcase)
user = ::User.find(sub.customer.user_id)
group.add(user) if group
puts "#{group_name} #{group&.id} <- #{user.email}"
end

Keybase proof

I hereby claim:

  • I am panbanda on github.
  • I am albanda (https://keybase.io/albanda) on keybase.
  • I have a public key ASBy9Gz-HC2j3S_0j8GOkTAslYkeNfSv351AM5EAfiTqIAo

To claim this, I am signing this object:

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Roboto+Slab:400,700|Material+Icons" />
<link href="https://use.fontawesome.com/releases/v5.0.10/css/all.css" rel="stylesheet">
@panbanda
panbanda / cloudflare.tf
Last active January 22, 2019 12:14
Setup a domain on CloudFlare + Google MX using Terraform
variable "email" {}
variable "token" {}
variable "domain" {}
provider "cloudflare" {
email = "${var.email}"
token = "${var.token}"
}
# Setup the root domain
@panbanda
panbanda / backup-docker-databases.sh
Last active April 9, 2018 13:00
I had some personal docker compose'd containers that I wanted to backup without creating a cronjob for each. This backs up all db containers to S3 assuming they're named *_db_1
#!/bin/bash
S3KEY=""
S3SECRET=""
function putS3
{
path=$1
file=$2
aws_path=$3
@panbanda
panbanda / user.json
Last active February 7, 2017 16:16
STEP Conference API Response
{
"data": {
"type": "users",
"id": "d74abaf3-b908-4bfc-bd24-56a91e49c069",
"attributes": {
"firstName": "Bartoletti",
"lastName": "Justine",
"displayName": "Davon Mertz III",
"phone": "867-5309",
"birthday": "2016-06-18T16:53:03.000Z",
@panbanda
panbanda / 01 facebook.html
Last active January 12, 2017 09:26
Tracking Pixels
<!-- Facebook Pixel Code -->
<script>
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
document,'script','https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '996863543672364'); // Insert your pixel ID here.
fbq('track', 'PageView');
</script>