Skip to content

Instantly share code, notes, and snippets.

View edspencer's full-sized avatar
💭
Full Stack sprinkled with AI

Ed Spencer edspencer

💭
Full Stack sprinkled with AI
View GitHub Profile
# bragdoc.ai - instructions for code-generating LLMS
Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.
## Project Context
The project is called bragdoc.ai and is a chatbot that helps users keep a brag document about their achievements at work. Key features:
- Reads/listens to user messages, creates rows in a Achievements table for each achievement the user mentioned
- Creates weekly/monthly/performance review documents based on the data in the Achievements table
- Integrates with GitHub to extract achievements from commit messages and pull request descriptions
@edspencer
edspencer / .windsurfrules
Last active December 16, 2024 14:13
Version of Cursor/Windsurf/VS Code LLM rules shown by Yifan at https://www.youtube.com/watch?v=aG-utUqVrb0 (small changes by me)
# Project Instructions for Code-Generating LLMs
Every time you opt to implement a rule(s), explicitly articulate the rule(s) in the output. You can shorten the rule description to a single word or phrase.
## Project Context
The project is focused on developing a chatbot that does cool things
- List
- Your
- Features
{
"parser": "babel-eslint",
"env": {
"browser": true,
"node": true,
"worker": true,
"es6": true
},
"globals": {},
"plugins": [
@edspencer
edspencer / APOD-app-tap-listener.js
Created February 11, 2012 08:32
The app.js file for a simple Sencha Touch 2 APOD app
/**
* The final thing is to add a tap listener that is called whenever the user taps on the screen.
* We do a quick check to make sure they're not tapping on the carousel indicators (tapping on
* those indicators moves you between items so we don't want to override that), then either hide
* or show the info Component.
*/
Ext.Viewport.element.on('tap', function(e) {
if (!e.getTarget('.x-carousel-indicator')) {
if (titleVisible) {
info.element.removeCls('apod-title-visible');
(function() {
var originalRequest = Ext.Ajax.request;
Ext.Ajax.request = function(o) {
if (!(/config\/environment/.test(o.url))) {
o.url = String.format("/myprependString/{0}", o.url.replace(/^\//, ''));
}
return originalRequest.call(this, o);
};
+--------------------------+-----------+-----------+-----------+-----------+
| Name | Lines | LOC | Classes | LOC/C |
+--------------------------+-----------+-----------+-----------+-----------+
| Controllers | 1876 | 1288 | 53 | 24 |
| Models | 1466 | 936 | 49 | 19 |
| Views | 9816 | 7035 | 94 | 74 |
| Libraries | 375 | 257 | 5 | 51 |
| Controller Specs | 174 | 119 | 4 | 29 |
| Model Specs | 171 | 134 | 3 | 44 |
| View Specs | 446 | 315 | 3 | 105 |
/**
* Defines all routes required for this application
*/
ExtMVC.router.Router.defineRoutes = function(map) {
/**
* Sets up REST-like urls for a given model or models:
*
* map.resources('users');
*
* Is equivalent to:
edward-spencers-mac-pro:root ed$ ruby script/build auto all
Built Ext MVC Application
Built the ColumnTree plugin
Built the DrilldownLayout plugin
Built the Exporter plugin
Built the GroupNavPanel plugin
Built the Notification plugin
Built the PazPar2 plugin
Built the Printer plugin
=== Contents of ../config/environment.json ===
{
//define the app. files are loaded in this order
overrides : ['Ext.Ajax', 'Ext.Component'],
plugins : ['Printer', 'Notification', 'GroupTabPanel', 'ColumnTree', 'Exporter', 'PazPar2'],
models : ['Operator', 'Fund'],
controllers: ['Application', ']
/**
* @class Ext.ux.HumanReadableGrid
* @extends Ext.grid.GridPanel
* An extended MVC scaffold grid with support for easily showing human-readable strings for associated models
* instead of the default numerical ID. See loadAssociatedModel documentation for implementation details
*/
Ext.ux.HumanReadableGrid = Ext.extend(Ext.grid.GridPanel, {
closable: true,