Skip to content

Commit 7459d47

Browse files
committed
A workaholic with a fountain and an ink pen. House in the mountains and he stopped drinking again.
1 parent 5d1a1d4 commit 7459d47

File tree

4 files changed

+84
-47
lines changed

4 files changed

+84
-47
lines changed

src/components/ShareButton.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { Button } from '@/components/Button'
66
import { ClipboardIcon, CheckIcon } from '@heroicons/react/24/outline' // Using Heroicons for feedback
77
import clsx from 'clsx'
88

9-
export default function ShareButton({ buttonText = 'Share this guide', copiedText = 'Link Copied!', ...props }) {
9+
export default function ShareButton({ buttonText = 'Share this guide', copiedText = 'Link Copied!', onCopy, ...props }) {
1010
const [isCopied, setIsCopied] = useState(false)
1111
const pathname = usePathname()
1212
const [fullUrl, setFullUrl] = useState('')
@@ -24,6 +24,9 @@ export default function ShareButton({ buttonText = 'Share this guide', copiedTex
2424
try {
2525
await navigator.clipboard.writeText(fullUrl)
2626
setIsCopied(true)
27+
if (typeof onCopy === 'function') {
28+
onCopy()
29+
}
2730
setTimeout(() => {
2831
setIsCopied(false)
2932
}, 2000) // Reset icon/text after 2 seconds
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
'use client'
2+
import ShareButton from './ShareButton'
3+
import { track } from '@vercel/analytics'
4+
5+
export default function ShareButtonTracked(props) {
6+
return (
7+
<ShareButton
8+
{...props}
9+
onCopy={() => {
10+
track('share-guide', { location: 'top' })
11+
}}
12+
/>
13+
)
14+
}

src/content/blog/vibe-coding-guide/page.mdx

Lines changed: 66 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,19 @@ import RandomPortrait from '@/components/RandomPortrait'
66
import CV from '@/components/CV'
77
import ShareButton from '@/components/ShareButton'
88
import Newsletter from '@/components/Newsletter'
9+
import ShareButtonTracked from '@/components/ShareButtonTracked'
910

1011
import secretsProtection from '@/images/secret-protection.webp'
11-
import vibeCodingPremium from '@/images/vibe-coding-protection.webp'
12+
import secretsVsNonSecrets from '@/images/secrets-non-secrets.webp'
13+
import vibeCodingProtection from '@/images/vibe-coding-protection.webp'
14+
import vibeCodingPremium from '@/images/vibe-coding-premium.webp'
1215
import secretsHero from '@/images/vibe-coding-survival-guide.webp'
16+
import gitSafetyNet from '@/images/git-safety-net.webp'
1317
import gettingGot from '@/images/getting-got.webp'
1418
import secretsFlow from '@/images/secrets-flow.webp'
19+
import secretsGuard from '@/images/secret-guard.webp'
20+
import secretsLeak from '@/images/secrets-leak.webp'
21+
import neverCommitEnv from '@/images/never-commit-env.webp'
1522

1623
import { createMetadata } from '@/utils/createMetadata'
1724

@@ -24,8 +31,6 @@ export const metadata = createMetadata({
2431
image: secretsHero,
2532
})
2633

27-
*I've spent 13+ years securing apps at companies like Cloudflare and Pinecone. Trust me: leaking secrets hurts worse than forgetting to save your game.*
28-
2934
## Why Secrets Matter (The $500 tweet)
3035

3136
<div className="my-6 grid grid-cols-1 md:grid-cols-2 gap-6 not-prose">
@@ -41,7 +46,7 @@ export const metadata = createMetadata({
4146
<figcaption>Don't end up like Leo. Learn enough to protect yourself, or buy the premium package to protect your secrets.</figcaption>
4247

4348
<Link href="/products/vibe-coding-mastery">
44-
<Image src={vibeCodingPremium} alt="Vibe coding premium protects you against leaking secrets" />
49+
<Image src={vibeCodingProtection} alt="Vibe coding premium protects you against leaking secrets" />
4550
</Link>
4651

4752
<figcaption>Premium includes a step-by-step screencast and instructions on setting up a special tool that makes it impossible for you to commit secrets to git (so you never end up like Leo).*</figcaption>
@@ -50,7 +55,15 @@ Publishing an OpenAI key to a public repo is the software equivalent of tweeting
5055

5156
Attackers can crank out four‑figure bills (or worse, wipe data) before you notice the email from Stripe.
5257

53-
<Image src={gettingGot} alt="Publishing your secrets on the public internet is the equivalent of walking through times square and throwing your credit cards at strangers" />
58+
<Link href="/products/vibe-coding-mastery">
59+
<Image src={secretsLeak} alt="How secrets get leaked and abused" className="my-6" />
60+
</Link>
61+
62+
*I've spent 13+ years securing apps at companies like Cloudflare and Pinecone. [Connect on LinkedIn](https://www.linkedin.com/in/zackproser/). Trust me: leaking secrets hurts worse than forgetting to save your game.*
63+
64+
<div className="flex justify-center my-8">
65+
<ShareButtonTracked buttonText="Share this guide" />
66+
</div>
5467

5568
## The New Coder's Trap
5669

@@ -60,22 +73,17 @@ Building with AI feels like you've hacked the system... until you:
6073
- Realize your "private" repo was public all along
6174

6275
**This happens because:**
63-
Cursor is still a tool for professional developers, which assumes you know things like:
76+
Cursor, Windsurf and Claude Code are still tools designed for professional developers, which assumes you know things like:
6477
- Where secrets actually live in production
6578
- How Git history really works
6679
- That API keys = credit cards
6780

68-
<Newsletter
69-
title="🚨 Tools Leo Wishes He Had"
70-
body="Only 100 early-access slots. Get screencasts + leak-prevention tools before they go live."
71-
successMessage="You're on the list! We'll email you about Vibe Coding Mastery."
72-
position="vibe-guide-mid-post"
73-
tags={['vibe-coder-premium-waitlist', 'source-vibe-guide-mid-post']}
74-
className="my-8 not-prose"
75-
/>
76-
7781
## What actually counts as a secret?
7882

83+
<Link href="/products/vibe-coding-mastery">
84+
<Image src={secretsVsNonSecrets} alt="What is a secret and what isn't?" />
85+
</Link>
86+
7987
### 🚨 Always Keep Private:
8088
- `OPENAI_API_KEY`
8189
- `DATABASE_URL` (e.g., `postgres://user:password@...`)
@@ -84,10 +92,23 @@ Cursor is still a tool for professional developers, which assumes you know thing
8492

8593
**If it looks like a password or unlocks paid access, it's a secret.**
8694

95+
<Newsletter
96+
title="🚨 Tools Leo Wishes He Had"
97+
body="100 early-access spots left—lock in lifetime updates. Premium members deploy 3x faster with AI-powered commit reviews."
98+
successMessage="You're on the list! We'll email you about Vibe Coding Mastery."
99+
position="vibe-guide-mid-post"
100+
tags={['vibe-coder-premium-waitlist', 'source-vibe-guide-mid-post']}
101+
className="my-8 not-prose"
102+
/>
103+
87104
---
88105

89106
## Git = Save Game, Explained 💾
90107

108+
<Link href="/products/vibe-coding-mastery">
109+
<Image src={gitSafetyNet} alt="Git is like a save system or safety net" />
110+
</Link>
111+
91112
Imagine your project is a video-game world:
92113

93114
| Game vibe | Git concept |
@@ -127,10 +148,9 @@ git reset --hard HEAD~1
127148
2. Panic? No! Run `git reset --hard HEAD~1` to revert to your last save.
128149
3. Try again on a new branch: `git checkout -b retry-feature`.
129150

130-
**Premium Bonus:** Screencasts walk you through real-world Git issues like fixing a botched `merge`.
131-
132151
<div className="not-prose my-4 p-4 rounded-md border border-yellow-400 bg-yellow-50 text-yellow-800 dark:border-yellow-600/30 dark:bg-yellow-900/20 dark:text-yellow-200">
133152
<strong className="font-semibold">🔒 Premium Only:</strong> Get pre-commit hooks and AI-powered rules that nudge Cursor to offer branches or checkpoints.
153+
<Image src={secretsGuard} alt="The premium version of this guide protects your secrets" />
134154
</div>
135155

136156
---
@@ -139,7 +159,9 @@ git reset --hard HEAD~1
139159

140160
<Image src={secretsFlow} alt="How secrets flow" />
141161

142-
**Secret** → a password-like string that unlocks a paid API or private database.
162+
**Secret** = Your code's credit card number. Leak it, pay for it.
163+
**Branch** = A sandbox for experiments. No branch? Bugs go live.
164+
143165
**Environment variable (.env)** → a locked drawer your code can peek into at runtime so secrets don't sit in code.
144166

145167
Think of .env as hiding your house key under a rock outside the door. Your code knows which rock to lift; strangers do not.
@@ -152,44 +174,42 @@ Quick checklist:
152174
### 💡 Try This (Free):
153175
Run `git add . && git commit -m "test"` to save your code.
154176

155-
**Premium Bonus:** Watch the screencast to see how Cursor's AI suggests commit messages *before* you type them.
177+
**Premium Bonus:** Watch the screencast and get the exact commands to set up a tool that makes it impossible to leak your secrets via git!**
156178

157179
---
158180

159-
## 🎥 What's in Premium?
181+
## Set Up GitGuardian for Automatic Secret Scanning
160182

161-
- **Screencasts:** Watch me debug a secret leak in real-time.
162-
- **Cursor Rules:** See how AI nudges you to safer commits.
163-
- **Templates:** Copy-paste CI/CD configs that block leaks automatically.
183+
To make sure you never accidentally commit secrets to any of your projects, you can install a global pre-commit hook with GitGuardian. This is a one-time setup that protects every repo on your machine.
164184

165-
<Link href="/products/vibe-coding-mastery">
166-
<img src="https://via.placeholder.com/600x300?text=Premium+Only:+Real-time+Secret+Scanning" alt="Premium only: GitGuardian blocking a leaked API key" />
167-
</Link>
168-
*Premium unlocks screencasts and tools that auto-block leaks before they happen.*
185+
**What does this mean?**
186+
- A "pre-commit hook" is a tiny program that runs every time you try to make a Git commit.
187+
- With GitGuardian, this hook will automatically scan your code for secrets (like API keys) before the commit goes through.
188+
- If it finds something dangerous, it will block the commit and show you exactly what needs fixing—before anything leaks!
169189

170-
[Join Waitlist for Early Access](/contact)
190+
**To install the global pre-commit hook, run:**
171191

172-
---
192+
```bash
193+
ggshield install -m global
194+
```
173195

174-
<div className="mt-16 mb-16 text-center not-prose">
175-
<h3 className="text-lg font-semibold text-zinc-900 dark:text-zinc-100 mb-2">
176-
Did this guide help?
177-
</h3>
178-
<div className="text-base text-zinc-600 dark:text-zinc-400 mb-4">
179-
Know someone else building with AI who could benefit? Please share it!
180-
</div>
181-
<ShareButton />
182-
</div>
196+
*This is a powerful safety net: it works for every project on your computer, not just one folder.*
183197

184198
---
185199

186-
## Survival Terms 📖
200+
## 🎥 What's in Premium?
187201

188-
| Term | What it really means + Risk |
189-
|-------------|-------------------------------------------------|
190-
| **Commit** | A save point for your project. Lose it? You're stuck debugging blind. |
191-
| **Branch** | A parallel timeline to test changes safely. Without one, bugs hit your live project. |
192-
| **Remote** | A GitHub copy of your project. Push unsafe code here? It becomes public. |
193-
| **Secret** | API keys, DB URLs — anything that costs money or gives access. Leak it, pay for it. |
202+
<Link href="/products/vibe-coding-mastery">
203+
<Image src={vibeCodingPremium} alt="Vibe Coding Mastery protects your secrets and makes everything as simple as possible to understand" />
204+
</Link>
194205

195-
---
206+
- **Screencasts:** In addition to the exact commands, you can watch me perform all the setup tasks in Cursor
207+
- **Cursor Rules:** I've created custom Cursor Rules files that protect you and teach you as you work.
208+
- **Make it impossible to leak secrets:** I show you exactly how, and give you the commands, to set up a world-class tool that makes it impossible for you to leak secrets via Git.
209+
210+
<Link href="/products/vibe-coding-mastery">
211+
212+
</Link>
213+
*Premium unlocks screencasts, exact commands, tools that auto-block leaks before they happen, and custom Cursor Rules to help you learn and protect you as you vibe code.*
214+
215+
[Join Waitlist for Early Access](/contact)

src/images/secret-guard.webp

138 KB
Loading

0 commit comments

Comments
 (0)