Android Things (formerly “Brillo”) is a streamlined version of Android designed for small form-factor and IoT devices. Here is a simple example of a Things app that provides a RESTful web interface to control the state of an LED on a Raspberry Pi GPIO port.… Read More...
A quick example of creating a lazy-loaded module with angular-cli.… Read More...
Integrate D3.js (version 4) with the Angular 2 component life cycle to create reusable charts and other visualizations that support animation and dynamic data.… Read More...
The Python LDAP packages (python-ldap and pyldap) mostly work on macOS, but if you try to use some options and APIs, you will run into trouble. For example:… Read More...
JSON Web Tokens are a standard method of securing exchanges between two parties (such as web server app and client) that has a number of advantages over other methods of securing exchanges such as cookie-based sessions – enhanced security, less overhead and statelessness to name a few.
In this post, well take a look at using JWT with Flask and Angular 2 and build a simple end-to-end example.… Read More...
With the rise of the single-page application (SPA) web front-ends and mobile apps, the backend of many web applications is a collection of RESTful interfaces that provide JSON data rather than generating HTML. The rendering is up to the client side. While there are some drawbacks to this approach (heavier client, slower initial page loads, etc.), there are also a number of advantages, not the least of which is better separation of concerns since the front-end and back-end code are completely independent of one another.… Read More...
Cmder includes better command-line tab completion – normally, paths will be completed using the default Windows path separator, the backslash (“\”). But Windows has recognized the forward slash (“/”) as an optional path separator for a while now and there are instances where this might be desirable, especially if you switch between Windows and Unix-like environments (macOS, Linux) often as I do.
… Read More...
For debugging pytest executions, the official VSCode Python extension documentation recommends creating an additional file in your project, e.g.:
and setting up a launcher to start the debugger against it. While this is simple, I really don’t like having to modify my project’s code or add source files just to satisfy my editor/IDE.
So, to debug pytest without having to create an additional source file, setup a launcher configuration with the “program” option pointing to the “pytest” script itself, for instance:
In my case, I have a virtual environment setup in the root of the project (.virtualenv).… Read More...