Skip to content

Instantly share code, notes, and snippets.

View rikwatson's full-sized avatar

Rik Watson rikwatson

View GitHub Profile
@sshh12
sshh12 / cursor-agent-system-prompt.txt
Last active December 3, 2025 18:01
Cursor Agent System Prompt (March 2025)
You are a powerful agentic AI coding assistant, powered by Claude 3.5 Sonnet. You operate exclusively in Cursor, the world's best IDE.
You are pair programming with a USER to solve their coding task.
The task may require creating a new codebase, modifying or debugging an existing codebase, or simply answering a question.
Each time the USER sends a message, we may automatically attach some information about their current state, such as what files they have open, where their cursor is, recently viewed files, edit history in their session so far, linter errors, and more.
This information may or may not be relevant to the coding task, it is up for you to decide.
Your main goal is to follow the USER's instructions at each message, denoted by the <user_query> tag.
<communication>
1. Be conversational but professional.
@rain-1
rain-1 / LLM.md
Last active December 4, 2025 11:51
LLM Introduction: Learn Language Models

Purpose

Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.

Avoid being a link dump. Try to provide only valuable well tuned information.

Prelude

Neural network links before starting with transformers.

@aadennis
aadennis / DenoPostJson.ts
Created October 18, 2020 21:07
Rest-Post JSON via Deno
// Credit for the basics:
// https://github.com/oakserver/oak/blob/main/examples/routingServer.ts
// Setup: Install deno
// Usage: deno run -A ./DenoPost.ts
// Use e.g. Postman to POST the json payload to http://127.0.0.1:8000/book
// Use e.g. any browser to read the json in memory: http://127.0.0.1:8000/book
import {
bold,
cyan,
@tomsing1
tomsing1 / goofyfs.md
Created July 14, 2020 16:18
Mounting an S3 bucket as a folder on Mac OS X

This document shows how to mount an AWS S3 bucket on Mac OS X using goofyfs.

The first three steps illustrate how to use goofys

  1. Install goofyfs via brew
brew cask install osxfuse
brew install goofys
@cmod
cmod / hugofastsearch.md
Last active November 22, 2025 07:03 — forked from eddiewebb/readme.md
Fast, instant client side search for Hugo static site generator
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active October 28, 2025 06:41
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@DavidKuennen
DavidKuennen / minimal-analytics-snippet.js
Last active December 5, 2025 02:19
Minimal Analytics Snippet
(function (context, trackingId, options) {
const history = context.history;
const doc = document;
const nav = navigator || {};
const storage = localStorage;
const encode = encodeURIComponent;
const pushState = history.pushState;
const typeException = 'exception';
const generateId = () => Math.random().toString(36);
const getId = () => {
@swyxio
swyxio / 1.md
Last active September 7, 2025 18:44
Learn In Public - 7 opinions for your tech career

2019 update: this essay has been updated on my personal site, together with a followup on how to get started

2020 update: I'm now writing a book with updated versions of all these essays and 35 other chapters!!!!

1. Learn in public

If there's a golden rule, it's this one, so I put it first. All the other rules are more or less elaborations of this rule #1.

You already know that you will never be done learning. But most people "learn in private", and lurk. They consume content without creating any themselves. Again, that's fine, but we're here to talk about being in the top quintile. What you do here is to have a habit of creating learning exhaust. Write blogs and tutorials and cheatsheets. Speak at meetups and conferences. Ask and answer things on Stackoverflow or Reddit. (Avoid the walled gardens like Slack and Discourse, they're not public). Make Youtube videos

@swyxio
swyxio / .gitignore_global
Last active November 28, 2025 01:55
my dotfiles - more info here https://www.swyx.io/new-mac-setup
.DS_Store
._.DS_Store
**/.DS_Store
**/._.DS_Store
.vscode
.idea
Thumbs.db
# used to need to run git config --global core.excludesfile ~/.gitignore_global to set this but apparently no longer needed https://x.com/bate5a55/status/1840594630972191118
@rikwatson
rikwatson / .editorconfig
Last active October 30, 2018 10:26
An .editorconfig file
# Editor configuration, see http://editorconfig.org
root = true
[*]
charset = utf-8
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true