Tutorials Index Page 6

intermediate

Unifi controller install steps and troubleshooting

In this short tutorial we explain how to install unifi controller in ubuntu. Just install it with sudo apt install unifiafter adding the ubiquiti repository.

beginner

pip install error: locale.Error: unsupported locale setting

When you install a apackage with pip and you get the error: locale.Error: unsupported locale setting, try to set the locale like this: export LC_ALL=C. Check out full solution here!

beginner

Using the host command to perform DNS queries

The command **host** is a DNS lookup utility that can be used to make DNS queries. Check this tutorial to learn how to use the host command. We are going to explain how to use it here.

How to Trim String in JavaScript ?

With javascript if you need to remove the spaces on left and right you can use trim. If you need to trim only the left side of the string use replace with a regex, ex: str.replace(/^s+/,'');. Check this article for more details

intermediate

Flask: How to Test file upload

Example on how to test file upload using flask client. Check here how to do a request using the FlaskClient to simulare a file upload. You need to put a tuple in the request payload with the data types: (, ) ex. file': (StringIO('my file contents'), 'test_file.txt'). Check here for a full example

How to connect to Wi-Fi using command-line with Ubuntu 18.04?

Debian/Ubuntu linux uses wpa_supplication to support WPA/WPA2 connections. In this tutorial we are going to connect to the Wi-Fi using the command line. See how to do it.

intermediate

Vue.js: How to show first and last element of an array in templates

Sometimes in templates you need to show the first or last element of an array or you need to close a html tag on the last item while you are doing an iteration. You can just use Vue protototype to extend it: Vue.prototype.$last = function (item, list) { return item === list[list.length - 1] }. Check here for full details.

intermediate

How to transfer files over the network using Netcat

Netcat is a helpful tool when you are in a hurry to transfer files between machines. Om this tutorial we will explain how to receive and send files using netcat. For receive: nc -l -p 9999 > received_file.txt, For sending: nc 192.168.0.1 9999 < received_file.txt. Check here how to compress and uncompress data using netcat.

How to Show or Hide Files in Finder (OSX)

If you want to show or hide files in finder you can use defaults command. To enable it use defaults write com.apple.finder AppleShowAllFiles TRUE. You need to kill Finder, check here for more details

beginner

Test SSL / TLS with GnuTLS from the Command Line

In this tutorial we are going to use gnutls-cli from the command line to test SSL/TLS connection. This command could be useful to test a web or an imap server. Install it with: sudo apt -y install gnutls-bin. Example of usage: gnutls-cli -d 5 imap.gmail.com -p 993