Yes. And it’s a strange one. I made a program to gender swap any text you put into it and then got a book deal to rewrite and illustrate Fairy Tales. It’s been published around the world. https://genderswappedfairytales.com The idea is to shine a light on the original versions but it also creates a lot of never-written-before characters. A lot of brave princesses and lady-beasts, but also men desperately wanting chil…
Ask HN: Have you created programs for only your personal use?
231–240 of 671 posts
Re: Ask HN: Have you created programs for only your personal use?
#232I made simple script that converts DB ids output per line that you'd get from a query into a comma separated line with a one line bash script.
e.g. converts:
1
2
3
to:
1, 2, 3
Since I do a lot of querying it is very helpful. To achieve the same thing in Excel is a fucking nightmare.
The cool part is when I feed it like 50000 lines of input how relatively quick it does it.
alias onelinify="paste -d, -s -"
example usage (on macos): cat db-ids.txt | onelinify | pbcopy
Re: Ask HN: Have you created programs for only your personal use?
#233Re: Ask HN: Have you created programs for only your personal use?
#234Re: Ask HN: Have you created programs for only your personal use?
#235I created a program that outputs one of my kid's name if the day of year is even, the other kid's name if it's odd. I use it to determine who's turn it is to take a shower first. They'll argue with me and each other all day long but for some reason they will not argue with the computer.
Install a second shower-head and make them shower together. Parallel processing is your friend here.
Re: Ask HN: Have you created programs for only your personal use?
#236Hundreds! Doesn't everyone? Most of them are just bash scripts, many of which have now reached a complexity so high that I wish I'd started writing them in a different language but it's too late now. The majority of the rest are Python. Off the top of my head, the most used ones are: * A replacement front-end for "tar" and various compressors * A script to synchronize my music library to a compressed version for play…
> A secure-but-readable password generator I love pronounceable passwords, but there's research indicating that such generators typically produce lower than expected entropy. Do you mind sharing what algorithm you use?
#!/bin/bash
pickaword() {
WORDFREQFILE=/usr/share/dict/cracklib-small;
WORDLENGTH=$1;
awk -v wordlength="$WORDLENGTH" 'length($1) == wordlength {print $1}' "$WORDFREQFILE"|shuf|head -n 1;
}
[[ ! -z $1 ]] && numWords=$1 || numWords=4
separator="-"
count=0
currentWord=""
while [[ $count -lt $numWords ]]; do
[[ $count != 0 ]] && echo -n $separator
num=$((3 + RANDOM % 10))
word=$(pickaword $num)
echo -n "$word"
count=$(($count + 1));
done
echo ""
Edit: code formatting is hard. Source is: https://gitea.slowb.ro/ticoombs/dotfiles/src/branch/main/bin...Re: Ask HN: Have you created programs for only your personal use?
#237I created a program that outputs one of my kid's name if the day of year is even, the other kid's name if it's odd. I use it to determine who's turn it is to take a shower first. They'll argue with me and each other all day long but for some reason they will not argue with the computer.
has it been more than a year? How does Jimmy feel about going first on Dec 31 (day 365) and Jan 1 (day 1)?
Re: Ask HN: Have you created programs for only your personal use?
#238A webapp which helps with freestyling into rap beats. It throws rhymes at you which u can use to keep it "flowing".
Re: Ask HN: Have you created programs for only your personal use?
#239Yes. Scratching your own itch is one of the funnest parts of scripting. I made simple script that converts DB ids output per line that you'd get from a query into a comma separated line with a one line bash script. e.g. converts: 1 2 3 to: 1, 2, 3 Since I do a lot of querying it is very helpful. To achieve the same thing in Excel is a fucking nightmare. The cool part is when I feed it like 50000 lines of input how re…
Re: Ask HN: Have you created programs for only your personal use?
#240I can't count how many things I've made, most of which I abandoned after I stopped needing them. Sometimes I just make a one line shell script that uses a command line util, and other cases I'll write a bigger "script" (higher level programming language" which often still leverages command line tools.