Entries Category “misc”

Mon 12 October 2015

Creating a bootable El Capitan ISO image

It's very easy to create a bootable ISO image of El Capitan, if you have a working El Capitan system installed on your machine. Start with going to AppStore and installing El Capitan, so you'll have an application named Install El Capitan in your Application list. Then, you should follow … read more
Sun 03 May 2015

CMake support for Qt5's external resources

When writing a Qt5 application there is often a need to include graphical resources inside the application binary. As Qt is a portable framework, it doesn't use platform-specific solutions for resource storage like the Resource section in PE files on Windows systems. Qt has its own mechanism which is possible … read more
Tue 21 April 2015

Basic facts about MacOS X kernel extensions

Here are some facts about OS X's kernel extensions (kexts) that I've managed to aggregate. Installation basics Normally, whole directory that contains the kext must be owned by the root:wheel user. If it's not, you will get errors during loading phase of the kext. Additionally, your kext must be … read more
Mon 12 January 2015

About myself

I am a programmer first, and an UNIX enthusiast second. I have a Twitter account here, though I'm not using it much. I am also a Mastonaut (Mastodon user). My github repo can be found here, though there are mostly some of my own junk that won't help anyone but … read more
Thu 25 December 2014

Haskell for noobs, written by a noob

Haskell is a purely functional language. It means that it's different from "normal" imperative languages like C/C++, Ruby or Python. In a functional language, the thinking process is different. Instead of specifying the steps needed to perform an operation, you specify the result you'll want to get. This switch … read more
Thu 30 October 2014

Control over symbol exports in GCC

When dealing with creation of shared objects, one should keep in mind that the longer is the list of their exported symbols, the longer time is taken by the dynamic linker during the loading process. There is much information regarding the rules which should be followed when one tries to … read more
Sat 16 August 2014

Enabling core dumps on Linux

When creating a Linux application in a native language, such as C or C++, it's obvious that eventually a bug will appear. Some are easy to fix, but sometimes they're not. Normally you could just run gdb to figure out how to fix it, but what about a situation when … read more
Sat 09 August 2014

Enabling /dev/mem on MacOS X

Most of the operating systems that are somehow related to UNIX are offering a possibility to read the kernel memory by using the /dev/mem or /dev/kmem interfaces. Thanks to this, the administrator can inspect memory in much greater details than (s)he normally would. Unfortunately, from some reason … read more
Tue 05 August 2014

New GCC on an old Linux distribution

Sometimes you need to have a new version of gcc (i.e. to be able to leverage the features from C++11 standard), but you have an old distribution which doesn't have new gcc inside its repository. Here's how you can compile your own gcc on that distribution. Acquire gcc … read more
Fri 18 July 2014

Substitution rule for vim's Quickfix window when using WAF

I have a C++ project with *.cpp files located in c:\project. I'm also using a pseudo-out-of-tree build system, which uses c:\project\build directory as an output directory for every executable, object file, autogenerated file, etc. Normally, I'm launching vim when by current directory (PWD) is c:\project: $ vim … read more
Mon 07 July 2014

Defeating NAT with reverse SSH proxies

Having a public IP is not as popular as 10 years ago. In earlier days the user could pay extra cash for this useful service, but now it's often an option that is simply not for sale. Is it possible to access your home network, when this network sits behind … read more
Wed 02 July 2014

PCI device enumeration using ports 0xCF8, 0xCFC

This is how you can enumerate your PCI devices by using ports 0xCF8 and 0xCFC. Please note that this code is intended to run from the privileged mode (ring 0), thus it's compiled as a kernel module for Linux. The PCI specification can be downloaded from here (or, alternatively, you … read more
Tue 01 July 2014

D-Bus, UDisks and Glibmm bindings

One day I was having a problem with simple D-Bus concept. I was using Glibmm D-Bus bindings (Gio::DBus namespace) to access the UDisks interface. I wanted to read some attributes of every hard disk found in the system, so first I needed to enumerate all disks that UDisks was … read more