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 March 27, 2025 10:44
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
# enables tab completion for Terraform
# usually the command "terraform -install-autocomplete" adds the following lines,
# but on Apple Silicon it errored with "complete:13: command not found: compdef";
# the workaround is to also add the line "autoload -U +X compinit && compinit";
@martinbuberl
martinbuberl / git-import-repository.md
Last active March 27, 2025 10:43
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