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 May 28, 2025 20:26
Latest Zsh Profile File (~/.zshrc)
printf "\33c\e[3J" # clear terminal (removes "Last login" message)
echo ".zshrc loaded ..."
# Homebrew
eval "$(/opt/homebrew/bin/brew shellenv)" # add Homebrew to $PATH
# asdf
# install asdf as a universal version manager via Homebrew "brew install asdf"
# (see https://asdf-vm.com/guide/getting-started.html#_1-install-asdf);
. /opt/homebrew/opt/asdf/libexec/asdf.sh # load asdf (installed via Homebrew)
@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