nanodano's blog

Advertisement

Advertisement

STDIN, STDOUT, STDERR, Piping, and Redirecting

Operating systems recognize a couple special file descriptor IDs:

  • STDIN - 0 - Input usally coming in from keyboard.
  • STDOUT - 1 - Output from the application that is meant to consumed by the user, stored in a file, or piped to another application for parsing. Typically goes to terminal.
  • STDERR - 2 - Used for info, debug, and error messages to the user that are not intended to specifically be part of the application output. Typically goes to terminal.

This guide will look at how you can redirect and pipe these streams for better application development and system administration.

Electron with Angular Tutorial

Electron is an amazing framework that lets you create desktop application using JavaScript, HTML, and CSS. It is essentially a web application that is self contained as a desktop application. The Electron API lets you access native system elements like the system tray icons, menus, dialogs, etc.

In this guide, we will look at how to create an Electron application with the Angular framework using TypeScript. We will cover:

  • Building a project from scratch
  • Packaging the desktop application for distribution
  • Using live reloading for development
  • Using Electron APIs for inter-process communication

Recursively Copy, Delete, and Move Directories in Windows

If you need to copy an entire directory to a new destination in Windows, you can use xcopy. This guide will show you how to use xcopy to recursively copy a directory, all of its subdirectories, and include hidden files. We will also look at how to remove a directory with rmdir and move a directory with move.

Set Environment Variables in Windows

In Windows, you sometimes need to modify environment variables. There are environment variables like %APPDATA% and %PROGRAMFILES% which contain useful paths, and others that contain things like your username (%USERNAME%). An important one that you may want to modify is %PATH%. In this guide we will look at how to set, check, update, and unset environment variables using the GUI and the command prompt.

Note that environment variables are case-insentive and that there are system-wide environment variables and user-specific environment variables.

Create a Windows .ico Icon File

When creating icons for Windows applications, sometimes you can't just use a .png file and you must use a special .ico format.

The ICO format is a collection of .png or .bmp images in a special structure. Fortunately, there are readily available tools to help you take a simple .png and convert it to the .ico file. This guide will look at a couple options.

NativeScript Tutorial

NativeScript is an amazing framework that lets you create cross-platform mobile applications for Android and iPhone using TypeScript. Not only does it allow you to use TypeScript, but you can also use Vue.js or Angular frameworks!

In this guide, I will focus on installing the necessary tools to build an Android application using the Angular framework in Windows.

How to Build Python from Source

Installing Python is easy using the pre-built installers and packages from your operating system. However, if you want to build the cutting-edge version directly from GitHub master branch, you will have to build your own version from source. You may also want to do it just to reinforce your understanding of Python.

This guide will walk through the steps needed to build Python 3 from source and then create a virtual environment that you can use for projects.

Using Stripe.js Elements with Angular

This will cover a simple example of how to get a credit card payment source token from Stripe that you can use to associate a Stripe customer with a payment source. This is good for subscription services where you need to store the payment source to later add subscriptions to.

We will look at the process for using Stripe.js Elements to create a credit card form that will obtain the token we need.

How to serve Angular locally over HTTPS

Angular has a convenient launcher to serve your app during development (ng serve). It watches for file changes and automatically reloads saving time. By default it serves over HTTP but to avoid issues with mixing HTTP and HTTPS content, you might want to run the local development server using SSL to serve over HTTPS. This will cover how to use ng serve and npm run start to include SSL certificates to use HTTPS.

Advertisement

Advertisement