Author Archives: smike19

Linux C error handling, errno and perror

If you have Java or .Net programming background you used to be familiar with exception which generated in runtime if something is going wrong with code execution. Linux C does not provide direct support to runtime error handling or exception handling. Usually code developer has to check return values from the functions. Generally C function… Read More »

Bash script for xml parsing

Usually XML processing is already implemented in programming languages. Several of them have numerous API for that. However some of these API are awkward and cumbersome. Recently it was necessary to parse xml file from bash script so I create my own parser. Basically what I create it is not inversion but small and it… Read More »

sizeof in c code, compilation and runtime

What is sizeof? In C sizeof is not a function, it is the unary operator sizeof which is measured in the number of byte-sized storage units required for the type. Usually it is calculated during compilation but some compilers could create code which computes sizeof in runtime. Now small quiz related to sizeof. Possible that… Read More »

No mountable file systems or something about Mac kernel extensions

Something happened with Macintosh device, the DMG file which was mounted before without problem cannot be mounted anymore. Several day ago it was OK, I installed several updates, rebooted my Mac couple of times and now something that worked before was rejected. The same result “no mountable file systems” I got when I double clicked… Read More »

View Mac OSX File System details from terminal

Mac OSX storage have 4 different concepts: disk, formatting, partition and volume. Disk are the physical devices where data are kept. Disk may be divided on several areas or partitions, every partition may contain own and be data partition as well. OSX may support up to 16 partitions per disk. OSX supports 2 main partition… Read More »

Kill Process Programmatically by PID

If your computer is slow it could be that some of the running processes is frozen state. So it is time to terminate them. In Windows you can do it thought Task Manager in Mac using Activity Monitor. Similarly the process may be stopped in Windows command prompt by TaskKill command or in Mac/Linux terminal… Read More »

CentOS upgrade.

Updating CentOS Linux is pretty simple procedure. Recently I updated one of my CentOS VM from one release to another and I want to share this information and keep it for future reverences. I did it though terminal window and started with checking initial release version: # cat /etc/redhat-release CentOS Linux release 7.5.1804 (Core) So… Read More »

NSIS

NSIS stands for Nullsoft Scriptable Install System. It is a professional script-driven open source system to create installers for Microsoft Windows and an alternative to commercial products like InstallShield. Here I present step by step how to create simple Windows installer for my project usb-cubby which saves passwords and personal information in encrypted way. First… Read More »

Xcode installation from xip file

It is not possible to know everything, but it is quite accessible to learn something new everyday. Recently I decided to upgrade my Xcode on my Mac laptop, I sent installed Xcode into trash. I went to Apple Store to download a new one and found that there is no Xcode dmg files, but Xcode… Read More »

Simple Xml Parser in Swift Language for Mac OSX

Here is example how to parse the XML file in Swift 4.1.2 Language for Mac OSX, using XMLParser class. During processing XML document XMLParser notifies its delegate about the handled items, such as elements, attributes, CDATA blocks, comments, and so on. The total list of delegate methods is presented here. The example does not use… Read More »