link element with
href set to a css file location, or creating a
CSS Module scripts.
When dealing with large text files such as parsing log files, it is always preferred to load/iterate the content line by line instead of reading everything into memory for efficiency and performance reasons. In Nodejs, it has always been a hassle because the way of reading line by line looks hacky and too low-level from a daily user’s perspective. However, that’s not the case any more thanks to a PR merged into the latest version of
v18.11.0, there is now
FileHandle.prototype.readLines builtin which makes it very convenient to use.
In other programming languages such as Java, Ruby and Python, there are
It becomes annoying sometimes if ssh connection gets terminated very soon if no messages sent between the ssh server and client for sometime but there are ways to keep it alive for long or forever from either client or server side.
In Nodejs when dealing with non-text files (e.g. images) IO operations such as transferring via network or reading from disk, there is a big chance to receive the content as
stream.Readable, and before we can process the complete data in memory such as calculating the bytes size or image dimensions, we need save the
buffer and here are a few ways.
The main things to handle during upgrading API centric application’s rails version from
6.0 include configuration tuning and deprecation warnings fixing.
v2.7.6 is the latest version before
v3.0 at the time of this writing and upgrading to
v2.7.6 may encounter a breaking issue if the application uses libraries that depend on
number could represent. However, when working with applications where you need exchange data with
JSON format, the
bigint values become a problem because
JSON does not know how to serialize
bigint values by default, in such cases, one solution is to convert the
string as this post shows.
Following Upgrade socket.io from v2 to v3, this post is about upgrading
socket.io and its associated packages to the latest versions as of when this post is written and the only setting changes seem to be from the
redis-adapater and the way to import client
io this time (for our specific use case).