Skip to content

Instantly share code, notes, and snippets.

View elhenro's full-sized avatar

Henry Schober elhenro

View GitHub Profile
#!/bin/bash
OUTPUTFILE="data.txt"
find . -type f -not -path "./node_modules/*" | while read -r file
do
numlines=$(wc -l < "$file")
if [[ $numlines -lt 1000 ]]; then
fileext="${file##*.}"
echo -e "\n$file\n" >> $OUTPUTFILE
echo -e "\n\`\`\`$fileext\n" >> $OUTPUTFILE
cat "$file" >> $OUTPUTFILE
@elhenro
elhenro / gist:a6cc9c24d1379255530852e54be32c85
Created October 20, 2023 13:36
Put this in ~/.zshrc in order to update ~/.zsh_history in realtime from all terminal sessions
setopt INC_APPEND_HISTORY
setopt SHARE_HISTORY