381
you are viewing a single comment's thread
view the rest of the comments
[-] joyjoy@lemmy.zip 41 points 3 weeks ago

Why are you using Node.removeChild for? Are you trying to support a 13 year old browser? Switch to Element.remove

[-] bestelbus22@lemmy.world 72 points 3 weeks ago

Lack of knowledge I guess. Which is why I like posting code on the internet. Thanks for the tip!

[-] callyral@pawb.social 9 points 3 weeks ago

perhaps i too will post code on the internet

here is a shell script i wrote for automating filenames for markdown files (blog posts):

code

#!/bin/sh
set -e

datecmd="date +%Y-%m-%d"

if [ -z "$1" ]; then
  printf "Post title: " >&2
  read -r title
else
  title="$1"
fi

file="$($datecmd)_$title.md"

if [ -f "$file" ]; then
  printf "Error: post '$file' already exists.\n" >&2
  exit 1
fi

${EDITOR:-nano} "$file"

im not sure why i made it since i could just look at what date it is and write it down manually in the file name, but i felt like doing that as a quick hack

[-] timsjel@piefed.world 2 points 3 weeks ago

Here is my most recent script, not gonna lie, pretty proud of this bad boy. /s

shjava per/med/xwpp01 A001 conv.txt

echo 'yo'

shjava per/med/xwpp01 A002 conv.txt

echo 'yo'

shjava per/med/xwpp01 A003 conv.txt

echo 'yo'

shjava per/med/xwpp01 A004 conv.txt

echo 'yo'

shjava per/med/xwpp01 A005 conv.txt

echo 'yo'

shjava per/med/xwpp01 A006 conv.txt

echo 'yo'

shjava per/med/xwpp01 A007 conv.txt

echo 'yo'

shjava per/med/xwpp01 A008 conv.txt

echo 'yo'

load more comments (3 replies)
load more comments (4 replies)
load more comments (6 replies)
this post was submitted on 21 Jan 2026
381 points (99.2% liked)

Programmer Humor

29717 readers
1615 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS