I used clearTimeout instead of clearInterval to clear a timeout and it worked.
Found a stackoverflow question: https://stackoverflow.com/q/9913719/1443630
Whenever I learn something new or interesting that I'd like to share, this is where I post it I guess along with a few other social media sites. Not everything may interesting you, so feel free to filter it down using tags!
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.
Query Language Reference (Version 0.7) | Charts | Google for Developers
QUERY function - Google Docs Editors Help
Google Sheets supports a QUERY function using which we can run queries on a range of data.
The Google Visualization API Query Language has a SQL-like syntax and exposes a variety of functions to work on the selected range.
For example,
The following query groups by date summing the values in column B. The query runs on the range A:B
=QUERY(A:B, "SELECT todate(A), SUM(B) GROUP BY todate(A)")"Do you want your life to be better or worse or stay the same?"
— Michael Scott