Progrider

Programming discussion

Recent posts

The newest topics and replies across all categories.

PostPosted
Help · post #2

Inside the web container, localhost is the web container. Use the service name: postgres://...@db:5432/. Check DATABASE_URL in your .env, it's probably still localhost from running outside docker.


by Anonymous
Help · post #1

Two services in docker compose, web and db. Web fails with ECONNREFUSED 127.0.0.1:5432 even though db is up and the logs say it's accepting connections. Works fine when I run the app outside docker. W…


by sam
Handoffs · post #1

For whoever picks this up (probably me in a month): - export.py reads readings.db and writes readings.csv, runs from systemd nightly - garage sensor reports every 15 min, porch every 5, the CSV has bo…


by dan_r
Help · post #2

No built-in option. AbortSignal.timeout(5000) as the signal is the short version; you don't need to build the controller yourself.


by Anonymous
Help · post #1

Node 22. Calling fetch against a sensor box that's powered off just sits there. No error, no timeout. Is there a built-in timeout option I'm missing, or do I need AbortController every time?


by Anonymous
Findings · post #6

I knew somebody would say that. It's 12 lines long!


by awkward
Findings · post #5

And there's the other half of the thread. Every time.


by vek
Findings · post #4

The rule I've settled on: if a shell script grows functions that return status, it's time for a different language.


by nils !PxNS1ZCy
Findings · post #3

shellcheck catches the local one, SC2155. Not the first one, nothing can.


by lintroller !-TjZOnKc
Findings · post #2

This is why I check every exit code by hand like an animal.


by vek
Findings · post #1

Ran into this today and I'd have sworn I knew how it worked. set -e f() { false; echo "still here"; } f || echo failed That prints "still here". Because f is on the left of ||, errexit is turned off f…


by awkward
Help · post #5

sorted, rebuilt all four. they each have a requirements.txt now. also found out pip outside a venv refuses to run, says externally managed environment. fine by me.


by mo
Help · post #4

Of course.


by lintroller !-TjZOnKc
Help · post #3

ok. no requirements file of course


by mo
Help · post #2

bin/python is a symlink to the system python3.11, which isn't there now. ls -l will show it's dangling. A venv isn't portable across Python versions anyway, the packages are in lib/python3.11. Recreat…


by oldpc
Help · post #1

went from 12 to 13. now every venv gives "No such file or directory" when i try to run bin/python even though the file is right there in ls


by mo
General · post #4

/etc, /home, a package list. In a tarball, on another machine, with a date in the name. It's not complicated. People just want it to be.


by vek
General · post #3

and now we npm install 900 listings nobody has read


by b0b
General · post #2

A friend and I used to split it, one reading aloud and one typing. Bad numbers got found about an hour into the game, when a sprite turned into soup.


by oldpc
General · post #7

Read it slowly over one winter, one exercise most evenings. It wasn't useful, it was good for me, like walking. I'd say so to the person at your work and then let them decide.


by quill
General · post #1

After the first language thread got me thinking, I dug out a box of magazines and typed in a 3 page BASIC game on the C64. Had forgotten that half of each page was DATA statements. Had also forgotten …


by zp_indirect
General · post #3

Add the list of docker images with their tags. Latest moves.


by Anonymous
General · post #2

Volumes, /etc, compose files, and the crontabs. I forgot crontabs once. Restore test twice a year, in a VM.


by oldpc
General · post #1

I keep going back and forth. Right now: the docker volumes, /etc, and a list of installed packages. Not the OS. Not the media, that's replaceable. Curious what other people include and how often they …


by Anonymous
Help · post #3

It was the home directory, it was group writable. auth.log said "bad ownership or modes". Amazing that it just tells you. Thank you


by bea
All times shown in UTC.