Tutorials Index Page 1

beginner

How to disable Kali Linux auto-update

Follow this steps to disable apt-get auto updates for Kali: open dconf-editor, then go to org -> gnome -> software, Select 'download-updates'. Finally Scroll down until the end and set "use default value" to "false". Check here for more alternatives.

intermediate

kubernetes: The connection to the server localhost:8080 was refused

The error "The connection to the server localhost:8080 was refused - did you specify the right host or port?" is very common, check here how to solve the error with gcloud or while using kubectl command.

beginner

How to update package.json libraries to the latest version>

package.json contains information about your project, to update libraries automatically you can use "ncu -u" in the root of your project. ncu command can be installing with: npm i -g npm-check-updates

beginner

Golang: convert rune to int

Convert a rune to an int using int(rune - '0'). Read our article for more information

intermediate

Different ways to revert git repository commit

To undo last commit not pushed try: git reset --soft HEAD~1. To undo last commit pushed use: git revert HEAD~1. Check this tutorial for more examples!

beginner

ethereum: geth how to change the database (chaindata) directory?

Geth now support the datadir parameter, example: geth --datadir "/mnt/external"

How to find the mime type of a file in Python?

Here are some example on how to guess the mime type of a file using python. The first example uses the filename only and the second example opens the file to guess the mime type.

beginner

PostgreSQL: Update query for JSONB columns with examples

PostgreSQL 9.5 added the type JSONB, which supports json as datatype. Here we show an example on how to perform an UPDATE on a jsonb type using postgresql. If you want to override the whole dict, just send the json between single quotes. check here for some example queries.

intermediate

How to move luks encrypted disk to smaller SSD drive (using LVM)

In this tutorial, we are going to move a linux encrypted disk to a new one. In particular, we are going to move from an old hard drive to a brand new SSD (but smaller). This tutorial also works for moving encryted disk to a bigger disk.

flask example with POST API endpoint

In this tutorial, we are going to see how to create an API endpoint using flask. The endpoint will only accept POST request and it will use content-type application/json. Learn here how to create a minimal api rest with flask and python.