I used clearTimeout instead of clearInterval to clear a timeout and it worked.
Found a stackoverflow question: https://stackoverflow.com/q/9913719/1443630
Metropolis, a 1927 sci-fi movie, is set in a dystopian capitalist society where a whole city is owned by Joh Frederson. The story revolves around his son, Freder Frederson, wandering around the city having an adventure. To put it simply. It’s about class struggle. Maybe faith. At one point, I thought it’s an anti-capitalist movie and at another point, I thought it’s anti-communist… but maybe it’s both or neither.. it’s just a movie.
I started it out of curiousity to get a perspective on what people thought of as super futuristic in 1927. The movie is said to be set in 2026. The year I’m currently writing this in. It’s 18th January, 2026. It feels a little surreal that people 100 years ago dreamed of this time and made stories about it. I’ll go over the technology of Metropolis (as much as I could understand it) in this blog article.
I recently picked up Swift. This article is about some of the things in Swift that I thought were cool. I will probably update this as I come upon more cool stuff, which is bound to happen as I’m still starting out.
Tired of spending hours convincing an LLM to just do that one thing? You have tried lots of different ways to no satisfaction and yet it eludes you why it isn’t able to just do this really simple task? Look no further! You’ve reached the place you’ll learn the dark arts of making any LLM head over heels for you. I have worked with LLMs since about two years now and this guide is about what I learnt and how we can ensure the best prompts while also modifying prompts to accomodate evolving requirements.
A simple trick to iterate over a tuple in TypeScript without resorting to recursion.
Often, when working with Typescript, people tend to go for type assertions to suppress errors. Though that does suppress the immediate error, it is often the case that you’re causing yourself a pain by not fixing the underlying issue, and exposing yourself to bugs at runtime. The main advantage of Typescript is the types we define, the more accurate they are to reality the less often you’ll encounter type related bugs in production.The rest of this article is about type assertion, non null assertion, and how to avoid it.
So, you’ve learnt programming? You’ve made some easy programs? Maybe even made a few bigger projects? It’s about time for you guys to start making games. If you don’t know programming, I encourage you to use google to look for programming tutorials to learn a beginner friendly language like Python. After you’re done with that, come here again.
This tutorial is aimed at people who are `okay` at programming in C and are interested in making games. It’s also aimed at people who are bored of their life and want to just read something random which involves an awesome orange demon.
I used clearTimeout instead of clearInterval to clear a timeout and it worked.
Found a stackoverflow question: https://stackoverflow.com/q/9913719/1443630
Continuous socket.io connections quickly filled up the limit of 6 requests in my Firefox causing other requests to not get resolved either.
This is at least the case in Vite 7 I suppose. Could also be related to the particulars of my config. I will check later and see if I can reproduce this in a super small project.
The fix: just set the port again in the server section in your vite config. I
suppose strictPort only would make sense here, then?
This is related to this TIL: Firefox won’t tell you why it’s stalling your request
…or at least I did not find anything obvious that indicated the reason my requests were stalled was because there’s apparently a limit of 6 connections per domain it seems. More in another TIL.
also you can see the number of active connections at about:networking in
Firefox
found this on stackoverflow: https://stackoverflow.com/a/985704/1443630
use document.open
If you want to remove event listeners for a specific element or a set of elements - just clone them and replace the real ones with their clones.
Set the textwidth option first, e.g. :set textwidth=77
Then gq will reformat the lines you want.
For example,
gqgpipgq10jHere’s how I configure this in my .editorconfig to set a textwidth in
markdown files:
[*.md]max_line_length = 77CSS has a clamp function that takes a min value, “preferred” value and a max value.
If the preferred value is between min and max, then the preferred value is returned, otherwise the output is clamped based on min and max.
I used this recently on the astro rewrite of this blog while setting margin for my “See all posts” CTA so that it’s dependent on viewport size such that it never goes out of the viewport and smoothly goes inside the viewport as we resize.
margin-right: clamp(-25.5px,calc((900px - 100vw) / 2 - 10px),0px);Ref: clamp() - CSS | MDN
Use the command
vim "+norm Go" "+startinsert" $filenameto automatically move at the end of the file and start editing.
This is useful when you are invoking vim from another script i.e. when you don’t want this to be the default behaviour but want it in a special case.
For me this was useful for my journal script which appends the current time
at the end of a file and opens the file and (now) automatically moves to the end
and goes to insert mode.
"My name is Kim Dokja. Twenty-eight... No, wait. I was twenty-eight, and I was an employee of a game company. My hobby was reading web novels... It's pathetic, right? Well, this is who I am."
— Kim Dokja (Omniscient Reader's Viewpoint)