Miscellaneous programming tricks with C.

This is a very simple Hello World program in C. int main() { write(1, "Hello World\n", 14); }int main() { write(1, "Hello World\n", 14); } Counting how long a text string is. #include <stdio.h> #include <string.h> #define MSG "Hello Doctor, let’s get back to the TARDIS!" int main() { int g; g = strlen(MSG); if … Read more

Get some nice system information in real time with a nice utility.

There are many ways to get system information with various Linux utilities. But apps like neofetch are nice. The gotop utility for Ubuntu is a good way to display real-time system information in an Xterm. Install this nice utility this way. 4.4 Sat Feb 15 jason@Yog-Sothoth 0: $ sudo snap install gotop4.4 Sat Feb 15 … Read more

Get real time hardware information on a Linux system with this utility.

This very useful Linux utility is a good way to get real-time Linux system information, and compare various activity on a system such as disk reads and writes, or network activity. ubuntu ~ $ dstat You did not select any stats, using -cdngy by default. —-total-cpu-usage—- -dsk/total- -net/total- —paging– —system– usr sys idl wai hiq … Read more

My sysinfo program updated with new code. Even better than before!

https://github.com/john302/sysinfo. This is the link to my newly updated sysinfo program. This has code added using the sysinfo struct. This means that the memory and uptime information that is output is actually readable now. This is what the output of the memory and uptime section looks like now. homer@deusvult:~/Documents/sysinfo.kdevelop-1.0$ ./sysinfo 2 System information. System uptime … Read more