The vue text directive

The vue text directive is one of the first directives that one might start to use when getting started with vue directives. The vue text directive just updates the text content of an element to the value that is given when using it in a vue template. This is an alternative to using the mustache syntax that often pops up in mnay basic examples, simply put the v-text directive is just a directive way of doing the same thing actually. However there is also the native javaScript way of setting the text node of an element also, and there is also setting the inner html of an element as well.

There are other ways of updating the text content of an element in vuejs, as well as native javaScript, and there are also some related topics to this such as the vue html directive that might also need to be covered here while I am at it. So this post will be just a few quick examples on the vue text directive in vuejs, but I also will be touching base on Mustache syntax, native javaScript methods for editing a text node, and other vuejs directives and features that might come up when it comes to text and vuejs.

Read More

Linux Environment Variables

When taking the time to get a little more into how to work with Linux, and Bash, the topic of environment variables will come up from time to time. These are bash values that can effect how programs work in Linux. For example there is a $HOME environment variable that is the home path for the current user, many programs will use this value to know where to place a hidden config file for user settings then. There are many other such environment variables, and there are also ways of creating ones own such variables when doing so is called for, often when working out some kind of bash script.

There is knowing how to at least list, and set environment variables for starters. However there is also doing a few simple bash commands, and maybe event go so far as to make a program or two to really know why they are useful.

In this post I will be starting out with the basics when it comes to environment variables in Linux. This is just listing what the current variables are, and setting and deleting such variables. In addition at the end I might get into a few more advanced examples that Might help to get better insight as to how environment variables work, and how they can prove to be useful.

Read More

Linux base32 encoding and decoding on the command line

The the usr bin folder on most Linux systems there should be a linux base32 and base64 commands that can be used to do quick, simple base32 and 64 encodings and decodings in the command line. The commands can be fed some input via the standard input when it cokes to piping in what I want to encode to base32, the result is then a base32 encoding of what I piped in when it is not used with any options. Speaking of options what if I have some base32 or 64 code and I want to decoded it back, for this there is the -d option that will decode base32 or 64 into its original form.

If you are not familiar with base32 encoding it is a base32 number system composed of 32 digits. The human readable form of this would be to use the uppercase letters form A to Z and the numbers 2 to 7. There is also the base64 system that will make use of upper and lower case letters and numbers.

So in todays Linux post I will be checking out the base32 command as well as the base64 command for doing this sort of thing on the command line in a Linux operating system environment. I will of course also be touching base on a few other things when it comes to using these commands to create a collection of files such as piping, redirection, and other commands that can come into play with this.

Read More

Chrome app mode to create a window for a nodejs project

For this nodejs example I will be using the child process module to launch a new instance of chrome that will be started in app mode. This will result in a chrome window being opened, but it will not have a navigation bar, or any of the other features of a web browser. It will just be a window with a single page opened up in it.

This example will be kept fairly simple and sever as a possible starting point for other projects that might actually do something. This example when up and running will just result in a browser window starting in app mode, and once that browser window is close the window onload event will fire sending a post request back to the server that started it causes the process to exit. Nothing much, but I just wanted to get together a basic starting point for this kind of nodejs application, and with that said I guess that is what this is.

Read More

Standard Input in node.js wuth the child-process module

The standard input can be used as a source of data when making a nodejs script, doing so just requires the use of the child process module. There is the standard input property of a child process instance when using something like exec, or spawn in that module that is one way to go about reading standard input. However there is also the readline module in nodejs that can also be used as a way to get input via the command line that might be a better choice for some projects. In any case in this post I will be going over a few quick examples of using the standard input property of a child process instance.

Read More