I had a GCP Cloud Run function that rendered videos. It was fine for one video per request but after that it slowed to a crawl and needed to shut down to clear out whatever was wrong. I assume a memory leak in MoviePy? Spent a couple of days looking at multiple options and trying different things, in the end I just duplicated the service so I had three of them and rotated which one we sent video renders to and do eac…
Hah welcome to cloudrun! I was evaluating it a few years ago to host some internal corporate app. It worked great and was way easier to deploy than k8s setups. However after some testing we found out that the core logic of the app - a long running process, would just crawl to a halt after some time. It turned out google wanted to push you to use their (paid) queue / pubsub solutions, but they didn’t want it to be _to…
Ask HN: What's your "it's not stupid if it works" story?
461–470 of 510 posts
Re: Ask HN: What's your "it's not stupid if it works" story?
#462Mine's getting command output out of docker. For long builds (I had one that took 4 hours), it was gutting to have it fail a long way in and not be able to see the output of the RUN commands for thorough debugging. So I devised a stupidly simple way: add && echo "asdfasdfsadf" after each RUN command. I mashed the keyboard each time to come up with some nonsense token. That way, docker would see RUN lines as different…
Re: Ask HN: What's your "it's not stupid if it works" story?
#463Re: Ask HN: What's your "it's not stupid if it works" story?
#464Eventually I realized there were wireless doorbells that had a button whose circuit board was small enough to go into the hole in the wall for the doorbell button. I found one like that on Amazon, took off the wireless button casing, put the board inside the doorbell hole in the wall, and wired the fancy button onto the board. It works perfect.
Eventually I'll have to replace the batteries, but it is easy to access just removing the button. I'm on the first set of batteries 5+ years in now.
Re: Ask HN: What's your "it's not stupid if it works" story?
#465Eventually I read a random post on Reddit[0] how a guy tried putting it his SP3 in the freezer (in a sealed freezer bag) and it eventually came back to life.
I skeptically tried it. I thought freezing was more likely to destroy something else on it, but what did I have to lose? It was already dead.
I put it in a sealed freezer bag with as much air removed as possible, and then put it in the freezer for a couple of hours. I took it out, plugged power in, and I was able to turn it on!
The first time I did it, it only worked for a few days. I tried freezing it again, and that worked. It still works to this day, many years later. My theory is that it seemed like a power problem, and that freezing the battery put the chemistry through some kind of cycle that repaired it.
I did keep the Surface wrapped in layers of towel to warm it back up slowly. Mostly to help prevent any moisture from building up somewhere before it got to temperature.
[0] https://www.reddit.com/r/Surface/comments/5tficj/how_i_reviv...
Re: Ask HN: What's your "it's not stupid if it works" story?
#466Re: Ask HN: What's your "it's not stupid if it works" story?
#467I ended up running the program in MS-DOS, inside VirtualBox. I used MS-DOS to route the "printer" to COM1. Then on the outside, I routed the serial output to a file on the host machine.
He just clicked the shortcut that fired it all off, did the calculations he needed to do, and "printed it", then exited Tk!Solver. The batch file then checked for output, and if it was there, it printed it.
He was happy, and it only took about an hour to get it all working.
Re: Ask HN: What's your "it's not stupid if it works" story?
#468Earlier quoted context omitted.
Would love to see that implemented here in USA. People in places like NYC love to catch and spay every cat they see, then go on to complain about too many rodents around.
Rodents are an issue of trash and food left around, not a problem of not enough cats. Cats shit in my garden and leave dead songbirds where I grow food. No, we don’t need more cats.
1. An increase in the population of predators will have no effect on the population of the prey.
2. Rats don’t shit and/or aren’t attracted to food.
Are you speaking in jest or do you actually believe those? The fact that your second statement directly contradicts your first doesn’t help.
Re: Ask HN: What's your "it's not stupid if it works" story?
#469Earlier quoted context omitted.
That reminds me of my terrible spam prevention hack. We kept getting a bunch of spammers signing up for our newsletters, so I made the form require a JavaScript based hidden input to submit. That worked for a while, but then new spammers started executing the JS and getting through. So I added new JS that just waits 15 seconds before putting the right hidden values in the form, and that’s done the trick (for now).
So CSRF?
The real solution is to use a CAPTCHA, but they're so user hostile, that's the last resort.
Re: Ask HN: What's your "it's not stupid if it works" story?
#470Earlier quoted context omitted.
I'm assuming: 1. Generate a list of suburbs names separated by | 2. Simplify the regex: 2.1. Convert to a NFA 2.2. Turn it into a DFA 2.3. Merge redundant states 2.4. Turn it back into a regex
nfa? dfa?