Skip to content

Instantly share code, notes, and snippets.

View jeanbauer's full-sized avatar

Jean jeanbauer

View GitHub Profile
@jeanbauer
jeanbauer / CursorTools.json
Created February 3, 2025 12:25 — forked from ScriptedAlchemy/CursorTools.json
Reverse Engineering cursor prompts
{
"tools": [
{
"type": "function",
"function": {
"name": "codebase_search",
"description": "Find snippets of code from the codebase most relevant to the search query.\nThis is a semantic search tool, so the query should ask for something semantically matching what is needed.\nIf it makes sense to only search in particular directories, please specify them in the target_directories field.\nUnless there is a clear reason to use your own search query, please just reuse the user's exact query with their wording.\nTheir exact wording/phrasing can often be helpful for the semantic search query. Keeping the same exact question format can also be helpful.",
"parameters": {
"type": "object",
"properties": {
@jeanbauer
jeanbauer / Error description
Created January 6, 2019 10:38
Invariant Violation: Hooks can only be called inside the body of a function component.
Invariant Violation: Hooks can only be called inside the body of a function component.
2 |
3 | export function useFormField(initialValue) {
> 4 | const [value, setValue] = useState(initialValue)
| ^
5 |
6 | function onChange(e) {
7 | setValue(e.target.value)
@jeanbauer
jeanbauer / example.js
Created December 23, 2018 02:00
[REQUEST FOR FEEDBACK]: How to subscribe to realtime data using Firebase Collections and React Hooks
// Usage - client:
useEffect(() => {
subscribe('users', setUsers)
subscribe('messages', setMessages)
}
// Subscribe implementation
export function subscribe(collection, onDataReceive) {
db.collection(collection)
@jeanbauer
jeanbauer / form.js
Created December 16, 2018 01:15
Text Input using react hooks with a custom hook: useFormInput
import { useState } from 'react'
const Form = () => {
const name = useFormInput('Name')
return (
<>
<input {...name} />
</>
)

Keybase proof

I hereby claim:

  • I am jeanbauer on github.
  • I am jeanbauer (https://keybase.io/jeanbauer) on keybase.
  • I have a public key ASDC4KuyhEyvQCn_yguIMXgHN7XotjmC8_slacrZ22sHWgo

To claim this, I am signing this object:

### Keybase proof
I hereby claim:
* I am jeanbauer on github.
* I am jeanbauer (https://keybase.io/jeanbauer) on keybase.
* I have a public key ASDC4KuyhEyvQCn_yguIMXgHN7XotjmC8_slacrZ22sHWgo
To claim this, I am signing this object: