Clear systemd journal

Journalctl is a utility for querying and displaying logs from journald, systemd’s logging service. Journal logs can take considerable amount of disk space. Here are some useful steps to free up space on ubuntu and…

Uppercase first in VB.Net

To capitalize only the first character of a string you can create an extension, like this: Public Module MyModule Public Function UppercaseFirst(my_string As String) As String If String.IsNullOrWhiteSpace(my_string ) OrElse my_string .Length < 2 Then...

Connect and query to a Sqlite database in Golang

First you need to install the go-sqlite3 library downloadable from Github, github.com/mattn/go-sqlite3 Then copy and adapt the code below to your database. package main import ( “fmt” “database/sql” _ “github.com/mattn/go-sqlite3” ) func main() { db,…

Generate random numbers in GoLang

We continue our series on the Go programming language. Today we propose a very useful function to generate random numbers, in this case integers. package main import ( “fmt” “math/rand” “strconv” “time” ) func random(min,…

Connect to a Sql Server database with Go

In this example, let’s see how to connect to Sql Server, select and view the database version using Go programming language. package main import ( _ “github.com/denisenkom/go-mssqldb” “database/sql” “context” “log” “fmt” ) // Replace with…

Go HTTP POST request

With today’s post we return to regularly post on our blog. The first series of posts will be dedicated to the Go programming language. It is a language we highly appreciate and we used it…

Rtrim and Ltrim specific chars in VB.Net

Dim char_array_end = "<br />".ToCharArray Dim char_array_start = "I ".ToCharArray Dim my_string = "I love pizza, beer, sambuca<br />" Dim my_string_trimmed = my_string.TrimEnd(char_array_end) Console.WriteLine(my_string_trimmed) ‘I love pizza, beer, sambuca’ my_string_trimmed = my_string.TrimStart(char_array_start) Console.WriteLine(my_string_trimmed) ‘love pizza,…