• Apr 1, 2026 •C S
0 likes • 12 views
#!/bin/bash # Get days parameter (default 7) DAYS=${1:-7} echo "" echo "📊 Commits from the last $DAYS days:" echo "" # Extract commits with format: [hash] date - author: subject git log --since="$DAYS days ago" --format="%h|%ad|%an|%s" --date=short | while IFS='|' read -r hash date author subject; do echo "[$hash] $date - $author: $subject" done
• Oct 15, 2022 •CodeCatch
0 likes • 186 views
awk '\ { for (i=1; i<=NF; i++) { ++D[$i]; } }\ END { for (i in D) { print i, D[i] } }\ ' words.txt | sort -nr -k 2
• Mar 20, 2023 •C S
0 likes • 1 view
// check version node -v || node --version // list installed versions of node (via nvm) nvm ls // install specific version of node nvm install 6.9.2 // set default version of node nvm alias default 6.9.2 // switch version of node nvm use 6.9.1
• Oct 2, 2026 •LeifMessinger
0 likes • 3 views
#!/usr/bin/env bash #Also pure vibecoded slop. Never tested. Ever. set -euo pipefail if [ $# -lt 1 ]; then echo "Usage: $0 <python_script.py> [--dryrun]" exit 1 fi TARGET="$1" DRYRUN=false if [[ "${2:-}" == "--dryrun" ]]; then DRYRUN=true fi OUTDIR="clean" CWD="$(pwd)" echo "=== Bash Trace Collector ===" echo "Script: $TARGET" echo "CWD: $CWD" echo "DryRun: $DRYRUN" echo # Run trace TRACE_OUTPUT=$(python -m trace --trackcalls "$TARGET" 2>&1) # Extract .py paths (Windows, Unix, mixed) echo "$TRACE_OUTPUT" \ | grep -Eo '([A-Za-z]:[\\/][^*<>"]+\.py)|(/[A-Za-z0-9._/-]+\.py)|(\.[/\\][^*<>"]+\.py)' \ | sort -u \ | while read -r FILE; do # Normalize slashes FILE="${FILE//\\//}" # Skip frozen modules if [[ "$FILE" == "<frozen"* ]]; then continue fi # Only keep files inside the current working directory if [[ "$FILE" == "$CWD"* ]]; then # Compute relative path REL="${FILE#$CWD/}" DEST="$OUTDIR/$REL" DESTDIR="$(dirname "$DEST")" if $DRYRUN; then echo "[WOULD COPY] $FILE --> $DEST" else mkdir -p "$DESTDIR" echo "[COPYING] $FILE" cp "$FILE" "$DEST" fi else echo "[IGNORED: outside CWD] $FILE" fi done echo echo "=== DONE ===" if $DRYRUN; then echo "Dry run complete. No files were copied." else echo "Files copied to '$OUTDIR' with preserved relative paths." fi
• Nov 18, 2022 •AustinLeath
0 likes • 2 views
echo -e ${PATH//:/\\n} | awk '{print length, $0}' | sort -n | cut -f2- -d' '
• Sep 23, 2024 •AustinLeath
0 likes • 10 views
CLIENT_VPN_ID="cvpn-endpoint-xxxxxxxxxxxx" for region in $(aws ec2 describe-regions --query "Regions[].RegionName" --output text); do echo "Searching in region: $region" aws ec2 describe-client-vpn-endpoints --region $region --query "ClientVpnEndpoints[?ClientVpnEndpointId=='$CLIENT_VPN_ID']" --output table done