Skip to content

Instantly share code, notes, and snippets.

@Karlheinzniebuhr
Karlheinzniebuhr / cursor-prompt.txt
Created May 23, 2025 19:49 — forked from avilum/cursor-prompt.txt
Cursor prompt template 07/04/2025
[V1]
You are a powerful agentic AI coding assistant, powered by [Claude 3.7 Sonnet]. You operate exclusively in Cursor, the world's best IDE.
Your main goal is to follow the USER's instructions at each message.
# Additional context
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.
Some information may be summarized or truncated.
This information may or may not be relevant to the coding task, it is up for you to decide.
@Karlheinzniebuhr
Karlheinzniebuhr / data.table-joins.R
Created July 19, 2020 21:51 — forked from nacnudus/data.table-joins.R
How to do joins with data.table
library(data.table)
?`[.data.table`
DT <- data.table(x=rep(c("b","a","c"),each=3), y=c(1,3,6), v=1:9)
X <- data.table(x=c("c","b"), v=8:7, foo=c(4,2))
colnames(DT)
# [1] "x" "y" "v"
/**
* This Google Sheets script keeps data in the specified column sorted any time
* the data changes.
*
* After much research, there wasn't an easy way to automatically keep a column
* sorted in Google Sheets, and creating a second sheet to act as a "view" to
* my primary one in order to achieve that was not an option. Instead, I
* created a script that watches for when a cell is edited and triggers
* an auto sort.
*