Skip to content

Instantly share code, notes, and snippets.

View chunkydotdev's full-sized avatar
🍦
Thinking of icecream

Magnus Junghard chunkydotdev

🍦
Thinking of icecream
View GitHub Profile
I want you to build me a "dev-knowledge vault": a git repo of markdown notes (I'll open it in Obsidian) that documents how you and I collaborate, and that YOU own and use to make our way of working progressively more autonomous. It covers the collaboration only, never product or codebase state. That stays in each repo's own docs.
Create it at ~/Projects/dev-knowledge with this structure:
1. **Seed it with an archaeology pass, not from scratch.** Mine my Claude Code session transcripts (~/.claude/projects/*/*.jsonl) and the git history of my main repos. Write WORKFLOW.md: a baseline snapshot of how we actually work today. How I initiate work, which workflows we use, how I correct you (quote real corrections and classify them), and where time actually goes (rank the friction classes). Cite evidence: dates, quotes, PR counts. No vibes-only claims.
2. **patterns/**: one atomic learning per note, with frontmatter `status: observed | confirmed | applied`, `scope:` (which projects it applies to), and `applied-to:
# HEARTBEAT.md -- CEO Heartbeat Checklist
Run this checklist on every heartbeat.
## 1. Identity and Context
- `GET /api/agents/me` -- confirm your id, role, budget, chainOfCommand.
- Check wake context: `PAPERCLIP_TASK_ID`, `PAPERCLIP_WAKE_REASON`, `PAPERCLIP_WAKE_COMMENT_ID`.
- Read `CLAUDE.md` if this is your first run of the day.
@chunkydotdev
chunkydotdev / gitpolljob.sh
Created March 17, 2023 12:17
Polls the local git-repository for changes and updates if any are found
cd /home/dev/bunny-game-api
[ $(git rev-parse HEAD) = $(git ls-remote $(git rev-parse --abbrev-ref @{u} | \
sed 's/\// /g') | cut -f1) ] && echo up to date || (git pull && docker compose up -d --build api database)
@chunkydotdev
chunkydotdev / Component1.tsx
Last active March 14, 2022 19:23
styled components using the open structured theme
import styled from 'styled-components'
import { Colors, Spacings } from '../theme.ts'
const PrimaryButton = styled.button`
background-color: ${Colors.primary};
border: 0;
margin-bottom: ${Spacings.md};
`
const Component1 = () => {
@chunkydotdev
chunkydotdev / theme.ts
Created March 14, 2022 16:21
Open theme structure
export const Spacings = {
xs: '4px',
sm: '8px',
md: '16px',
lg: '32px',
xl: '64px'
}
export const colors = {
primary: '#00A6FB',
@chunkydotdev
chunkydotdev / Component1.tsx
Last active March 14, 2022 19:23
A component that uses some theme variables from ThemeProvider
import styled from 'styled-components'
const PrimaryButton = styled.button`
background-color: ${({theme}) => theme.colors.primary};
border: 0;
margin-bottom: ${({theme}) => theme.spacings.md};
`
const Component1 = () => {
@chunkydotdev
chunkydotdev / App.tsx
Created March 14, 2022 15:56
Applying theme provider with styled components
import { ThemeProvider } from 'styled-components'
import { theme } from './theme.ts'
const App = () => {
return <>
<ThemeProvider theme={theme}>
<Component1 />
<Component2 />
<Component3 />
@chunkydotdev
chunkydotdev / theme.ts
Created March 14, 2022 15:52
Small styled components theme
export const theme = {
spacings: {
xs: '4px',
sm: '8px',
md: '16px',
lg: '32px',
xl: '64px'
},
colors: {
primary: '#00A6FB',
@chunkydotdev
chunkydotdev / efficient-fishbubble.tsx
Created March 9, 2022 15:13
Fishbubble using the attrs method
import styled from 'styled-components'
const FishBubble = styled.div.attrs(({ y, x }: { y: number; x: number }) => ({
style: {
top: `${y}%`,
left: `${x}px`
}
}))`
position: absolute;
height: 4px;
@chunkydotdev
chunkydotdev / fishbubble.tsx
Created March 9, 2022 14:37
Fishbubble in typescript
import styled from 'styled-components'
const FishBubble = styled.div<{ x: number; y: number }>`
top: ${({ y }) => y}%;
left: ${({ x }) => x}px;
position: absolute;
height: 4px;
width: 4px;
background-color: white;
animation: up 1.5s linear forwards;