Quantcast
Channel: sleeplessbeastie's notes
Browsing all 770 articles
Browse latest View live
↧

How to setup operating-system-level virtualization solution

Build your first VServer on Debian Wheezy using psand.net public repository.Add VServer repositoryAdd GnuPG archive key for repo.psand.net repository to the list of trusted keys. $ wget -q -O -...

View Article


How to test whether a number is prime

Perform test whether a number is a prime using command-line factor utility.Check the number 809. $ factor 809 | awk 'NF==2 { check="is a" } NF>2 { check="is not a" } { print $1 "" check " prime...

View Article


How to display network connections using lsof and GNU awk

Two years ago I have described a simple way to display established TCP connections using ss command. Today I will use lsof and gawk to pretty print network connections.Notice, I am using gawk to take...

View Article

How to display message provided from standard input or as an parameter

Today, I will create a simple proof of concept shell script to diplay message provided from standard input or as an parameter, so it could be used as a template to write shell scripts that can be...

View Article

Image may be NSFW.
Clik here to view.

How to post message from command-line into Slack

Use defined webhook to post message from command-line as a parameter, standard input or a file into Slack, take the advantage of colors, icons and markdown to enhance your message.Shell scriptThe...

View Article


How to assign an IPv6 address to an interface

Stop running away from this, request and assign an IPv6 address to an external interface to make content available over both IPv4 and IPv6.Assign an IPv6 address to an interface using ip utility. $ ip...

View Article

How to fix the missing HPE's public keys

HPE Software Delivery Repository is cryptographically signed, so you can be sure that provided software packages have not been modified by a third party. However, sometimes you can encounter the The...

View Article

How to use loop devices

I have a feeling that loop devices are now used less frequently, but these are still relevant and useful.Display first found loop device. $ losetup --find /dev/loop0Attach file using first found loop...

View Article


How to check connection to the RabbitMQ message broker

Use Python script to verify that client can connect to the RabbitMQ message broker.PrerequisitesInstall Pika a pure-Python implementation of the AMQP 0-9-1 protocol. $ sudo apt install python3-pip $...

View Article


How to install packages using repository snapshot

It is rarely mentioned, but you can use repository snapshots to download and install old and obsolete packages on already unsupported or even current Debian distributions.Snaphot creation dateI will...

View Article

How to restart process depending on the log file modification time

Sometimes it is important to monitor log file modification time to restart the writing process when the file was not modified for defined period of time. I have already described how to check file...

View Article

How to configure unixODBC

You can connect custom-built shell script with any database using unixODBC an implementation of the Open Database Connectivity standard and I will show you how to do this for SQLite and PostgreSQL...

View Article

How to display HTTP response code

Use curl utility to verify HTTP response code for given URL.The simplest way to display HTTP response code is to use quiet mode, discard output and display the numerical response code that was found in...

View Article


Image may be NSFW.
Clik here to view.

How to install and configure private MoinMoin wiki

Install and configure private instance of the MoinMoin wiki engine, which is a full-featured and extensible wiki software written in Python that can be used to store personal notes, knowledge base or...

View Article

How to upgrade lxd guests

It is time mention about simple sequential or simultaneous upgrade process on lxd guests. It is adapted to Debian-like operating systems using apt as I am using these on daily...

View Article


How to display real destination URL

I am using curl to verify redirects and display real destination URL and you should try it too.Command-lineThe simplest way to display real destination URL is to use quiet mode, discard output, follow...

View Article

Image may be NSFW.
Clik here to view.

How to mount WebDAV share

Nextcloud is a handy self hosted web-based application that can be used to store files, contacts and calendars. It provides the desktop and mobile client. In addition, it supports Web Distributed...

View Article


Image may be NSFW.
Clik here to view.

How to keep track of network latency

Keep track of network latency using SmokePing, uWSGI application server and nginx HTTP server. SmokePing supports many configurable probes, alerting and live charts accessible through a web browser. It...

View Article

Image may be NSFW.
Clik here to view.

How to execute CGI scripts using fcgiwrap

I am enthusiast of the uWSGI project, but you are not limited to it as you can use fcgiwrap a very lightweight and simple FastCGI wrapper for CGI scripts that does not require additional...

View Article

How to mount WebDAV share using systemd

You can check my earlier blog post on how to mount WebDAV share using command-line or fstab (file systems table), but you are not limited to these two options as you can use systemd to take care of the...

View Article
Browsing all 770 articles
Browse latest View live