Posts

Image Panning

Scrollbar Considerations

Many zooming libraries on npm offers the ability to pan images (translate images), after a large image has been zoomed in, however the majority of them do not take consideration of how the movement of the image affects the visibility of scrollbars.

Categories: #javascript #html
Give Screenshots More Space

Screenshot To Gutters

While taking an image screenshot of an entire software application such as the browser or terminal intact yields the most information when attempting to describe the behavior. It can be a bit difficult to discern what is actually happening in the application due to the "zoomed out" nature of the taken image. It is rare that a user will need to focus on the entirety of the image when a screenshot is shown, because only a certain portion of image is reference at one time.

Categories: #css
Snowpack - JavaScript Api

Control Over Start

When the Snowpack CLI is not able to provide fine-tune control over start operations, the Snowpack JavaScript Api should be used. Being able to programmatically control Snowpack is made possible when invoked inside other JavaScript files for enabling more configuration options.

Categories: #shell #typescript
Tags: #NodeJs
Testing OpenApi Spec File against Api Server URLs

Verifying Apis

Upon creating a REST API and then documenting with OpenApi, the entire set of routes are defined and described properly when the proper care is taken. To ensure that the server provides an Api that matches up to the OpenApi specification JSON or YAML, testing will be required.

Categories: #api #testing
Nestjs - OpenApi Example

Documenting Apis

Nestjs provides a more opinionated way in expressing structure when developing a backend for your Node.js application, and this prescribed way of doing things coupled with the usage of TypeScript allows for better maintainable code.

As stated in their project README.md:

Nest aims to provide an application architecture out of the box which allows for effortless creation of highly testable, scalable, loosely coupled and easily maintainable applications. The architecture is heavily inspired by Angular.

Categories: #api
reStructuredText - Include External Documents

Inline Variables Within a Paragraph

For general reuse, one can reference another file in reStructuredText using the include directive.

.. main.rst - this document will the insert the external content from the path below

.. include:: the/path/to/my-included-file.rst

This is good when the content which you want to embed directly into your document can stand by itself as a separate paragraph, however, if you wish to embed content inline within an existing paragraph, it would be necessary to place the included content as variables in another document with the following example.

Categories: #markup
Tags: #reStructuredText