bash_logo

Introduction to Bash Shell Parameter Expansions

A shell is a crucial part of an Unix-based operating system and is the main interface we can use to interact with the system itself. Bash is without doubt the most used shell on the majority of Linux distributions: it was born as thefree software replacement for the Bourne shell (bash is the acronym for Bourne-again shell) inside the GNU project. In this tutorial we will learn how some of the most useful bash expansions works.

In case you are not familiar with Bash yet, or you simply need to refresh your memory, then you are recommended to visit our Bash Scripting Tutorial for Beginners, before you dive into the Bash Shell expansions concept below.

In this tutorial you will learn:

  • How to use various bash parameter expansions

Read more

firefox-context-menu-extension-entry

How to create, package and sign a Firefox web extension

Firefox is one of the most used web browser in the world: it’s a free and open source software built by the Mozilla foundation, and it’s available for all the major operating systems. The browser has all the features that nowadays are considered standard: tabbed browsing, private navigation, a synchronization system and its functionalities can be extended using third party addons written in Javascript. In this tutorial we will see how to create, build and sign a simple web extension.

In this tutorial you will learn:

  • How to build and test a simple Firefox web extension
  • How to package and sign an extension

Read more

Python Encapsulation

Introduction

Encapsulation is one of the fundamental aspects of Object Oriented Programming. It allows programmers better control of how data flows in their programs, and it protects that data. Encapsulation also makes objects into more self-sufficient and independently functioning pieces.

The concept of encapsulation builds on what you did in the last two guides with classes and constructors. Constructors usually are usually used in close conjunction with encapsulation and actually aid in making encapsulation work seamlessly.

Read more

Check Java Version

Check Java Version

There are several ways on how to check what version of Java is installed on your system. Most likely the simplest way is to directly use the java binary in combination with the -version option. To do so run java -version on your terminal.

$ java -version

Read more

introduction-to-traits

How to Reuse PHP Code Effectively – Introduction to PHP traits

Originally developed by Rasmus Lerdorf in 1994, PHP is one of the most used general-purpose programming languages. Originally born as a template language, during the years it evolved into a fully-featured language with proper OOP (Object Oriented Programming) support. Its latest incarnation, 7.x, introduced new features like return type declaration for functions and huge performance improvements. PHP is a single inheritance language: this means that a class can inherit only for one parent or base class. To overcome this problem a feature was introduced in the language: traits. In this article we will see how to use it and how it works.

In this tutorial you will learn:

  • How to use traits in Php

Read more

script-context-menu-entry

How to extend the GNOME Nautilus file manager with custom scripts

Although GNOME, in its 3.x iteration has been the object of many debates, due to its non-traditional desktop paradigm, it is probably the most used desktop on Linux. The default file manager included in GNOME is Nautilus (the application new name is “Files”). In this tutorial we will see how we can extend the file manager with functionalities provided by custom scripts.

In this tutorial you will learn:

  • How to use custom scripts to extend Nautilus functionalities

Read more

Python Polymorphism

Introduction

Polymorphism is yet another important aspect of Object Oriented Programming. No Warcraft fans, it doesn’t have anything to do with turning people into sheep. That’d be much cooler. Instead, Polymorphism allows methods and functions to use classes with similar functionality in the same way.

Polymorphism cuts down on the amount of code that you need to write by eliminating redundancy in a logical and meaningful way. It relies on you, the programmer, to be clever in your design and harness similarities in objects.

Read more

Perl script to retrieve an external IP address

This simple perl script will print your external IP address assigned by you internet provider ( great for someone with dynamic IP address ).

First, we download a html file from ipchicken.com and then phrase this file to match for IP address in format X.X.X.X using regular expression.

Next, the script removes all unnecessary characters and prints your external IP address on the terminal. Lastly, the script removes previously downloaded index.html file.

Read more

zenity-logo

How to use graphical widgets in bash scripts with zenity

Zenity is a very useful utility which let us create graphical user interfaces for our shell scripts. Several widgets exists, and can be used by invoking the program with the respective options. The widgets are based on the GTK toolkit, and return the result of the user interaction either on the standard output or as a return code.

In this tutorial you will learn:

  • What are the general zenity options
  • What are the some of the most useful available widgets and how to use them

Read more

javascript-logo

How to use arrow functions in Javascript

The arrow functions syntax was introduced with ECMAScript6: by using this new syntax, in some (but not all) cases, we can produce more concise and readable code, especially when our function contains only one expression. In this tutorial we will see how we can define an arrow function, what are the differences with standard functions and what are the cases in which the use of arrow functions is not appropriate.

In this tutorial you will learn:

  • What is an arrow function.
  • How an arrow function is defined.
  • The differences between arrow functions and standard functions.
  • The cases in which arrow functions cannot be used.

Read more