Skip to content

Instantly share code, notes, and snippets.

@martinbuberl
martinbuberl / cloc-cheatsheet.md
Created March 27, 2025 10:33
cloc Cheatsheet

cloc Cheatsheet

Next.js

cloc command to count the lines of code in a typical Next.js project while ignoring node_modules, .next, and other generated or irrelevant files would be:

cloc . --exclude-dir=.git,.next,.vercel,.turbo,.vscode,build,dist,out,node_modules --include-ext=js,jsx,ts,tsx,css,scss,html,json,md
@martinbuberl
martinbuberl / settings.json
Last active March 27, 2025 10:44
Latest Cursor Settings File (~/Library/Application Support/Cursor/User/settings.json)
{
"window.commandCenter": true,
"editor.formatOnSave": true,
"editor.renderWhitespace": "all",
"editor.detectIndentation": false,
"editor.tabSize": 2,
"editor.insertSpaces": true,
"files.encoding": "utf8",
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
@martinbuberl
martinbuberl / .zshrc
Last active December 5, 2025 11:21
Latest Zsh Profile File (~/.zshrc)
printf "\33c\e[3J" # clear terminal (removes "Last login" message)
echo ".zshrc loaded ..."
# enable zsh history
HISTSIZE=20000 # in-memory history
SAVEHIST=20000 # saved to ~/.zsh_history
HISTFILE=~/.zsh_history
# zsh history options
setopt SHARE_HISTORY # share history across shells
setopt INC_APPEND_HISTORY # write commands immediately
@martinbuberl
martinbuberl / git-import-repository.md
Last active May 28, 2025 21:05
Import an Existing Git Repository into Another

Import an Existing Git Repository into Another

Before: Folder Structure (Two Separate Repositories)

XXX
 |- .git
 |- (project files)
YYY
 |- .git