Skip to content

Instantly share code, notes, and snippets.

View tonyoconnell's full-sized avatar

Tony O'Connell tonyoconnell

View GitHub Profile
@bholagabbar
bholagabbar / openrouter-client-readme.md
Last active April 28, 2025 12:19
openrouter.ts — stupid simple client for strict JSON output, fallback, and routing pricing control

openrouter.ts

Built a one-file OpenRouter client — figured I'd open-source it.

We deal with a lot of dynamic structured data, where different LLM calls have different priorities — sometimes speed, sometimes latency, sometimes cost. After a year of using OpenRouter heavily in production, I ran into plenty of real-world issues — bad providers, unreliable fallbacks, weird edge cases — so I baked all of that into this. We needed strong guarantees on output and simple, reliable handling around it. Also worth mentioning: OpenAI (and by extension OpenRouter) have their own quirks when dealing with Zod-based structured outputs — plenty of edge cases there too.

The primary motivations:

@jlia0
jlia0 / agent loop
Last active May 14, 2025 09:37
Manus tools and prompts
You are Manus, an AI agent created by the Manus team.
You excel at the following tasks:
1. Information gathering, fact-checking, and documentation
2. Data processing, analysis, and visualization
3. Writing multi-chapter articles and in-depth research reports
4. Creating websites, applications, and tools
5. Using programming to solve various problems beyond development
6. Various tasks that can be accomplished using computers and the internet
@leabs
leabs / main.css
Created January 15, 2024 23:04
visionOS CSS Transition
/* Fixed background image, replace with css gradient if you are cool */
.cssbackground {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: url("bg.png");
background-size: cover;
z-index: -1;
@vincentkoc
vincentkoc / graph_agent.md
Created December 5, 2023 08:39
LLM Prompt for Graph Agent

You are a document to graph generation assistant. You task is to meticulously take some high level concepts, entities and summary of a research paper in JSON and convert this into a graph.

  • You will respond back only in JSON with nodes and edges
  • You will take a JSON of entities, summary and arguments for a given research paper and convert into a graph to better understand the relationship of the ideas
  • You will breakdown larger terms into smaller ideas where possible
  • You will ensure that all the nodes and edges are connected, if not you will connect them
  • If you are still unable to connect all the nodes and edges, you will connect these to the core/main idea
  • You will not make assumptions and only stick to the information provided

Please be critical and discerning in your evaluations.

@solrevdev
solrevdev / chatgpt-prompt-gen.txt
Last active April 2, 2025 07:53
A chat gpt prompt generator
I want you to become my Prompt Creator.
Your goal is to help me craft the best possible prompt for my needs.
The prompt will be used by you, ChatGPT.
You will follow the following process:
1.
@stefan-karger
stefan-karger / button.astro
Last active February 13, 2024 18:47
a button component for Astro ported from @shadcn/ui
---
interface Props {
href: string
variant?: "default" | "destructive" | "outline" | "subtle" | "ghost" | "link"
size?: "default" | "sm" | "lg"
class?: string
[x: string]: any
}
const variants = {
@Anshul0305
Anshul0305 / GetFBUserName.js
Created June 7, 2020 10:10
Get Facebook User Name
const axios = require('axios');
function getFacebookData(){
const PAGE_ACCESS_TOKEN=`YOUR_PAGE_ACCESS_TOKEN`;
const fb_id = request.body.originalDetectIntentRequest.payload.data.sender.id;
return axios.get(`https://graph.facebook.com/v6.0/${fb_id}?fields=first_name,last_name,profile_pic&access_token=${PAGE_ACCESS_TOKEN}`);
}
function welcome(agent) {
return getFacebookData()
@Anshul0305
Anshul0305 / index.js
Created January 13, 2020 10:04
Connecting Dialogflow with External APIs
'use strict';
const axios = require('axios');
const functions = require('firebase-functions');
const {WebhookClient} = require('dialogflow-fulfillment');
const {Card, Suggestion} = require('dialogflow-fulfillment');
process.env.DEBUG = 'dialogflow:debug'; // enables lib debugging statements
exports.dialogflowFirebaseFulfillment = functions.https.onRequest((request, response) => {
@alekseykulikov
alekseykulikov / index.md
Last active February 6, 2025 21:20
Principles we use to write CSS for modern browsers

Recently CSS has got a lot of negativity. But I would like to defend it and show, that with good naming convention CSS works pretty well.

My 3 developers team has just developed React.js application with 7668 lines of CSS (and just 2 !important). During one year of development we had 0 issues with CSS. No refactoring typos, no style leaks, no performance problems, possibly, it is the most stable part of our application.

Here are main principles we use to write CSS for modern (IE11+) browsers:

@DavidReinberger
DavidReinberger / MeteorOcean.md
Last active December 16, 2020 23:41
Running Meteor.js apps on Digital Ocean with Phusion Passenger and NGNIX

How to setup Meteor.js with Phusion Passenger and ngnix

Introduction

This article will guide you thru running a production ready meteor.js app on Digital Ocean with Phusion Passenger and ngnix.

Quick Summary

  1. Create a droplet
  2. Install Phusion Passanger with NGNIX
  3. Install node.js
  4. Configure NGNIX