Coding with Titans

so breaking things happens constantly, but never on purpose

HowTo: Temperature on Raspberry Pi

One of the useful scripts I use to regularly check the temperature on my Raspberry Pi farm is following: #!/bin/bash cpu=$(</sys/class/thermal/thermal_zone0/temp) echo "$(date) @ $(hostname)" echo "---------------------------------------" echo "CPU => $((cpu / 1000))'C" echo "GPU => $(vcgencmd measure_temp | cut -d'=' -f 2)" It will print the current temperature values of the CPU and GPU separately. Enjoy! Read more →

HowTo: Get currently active version of Xcode

Sometimes knowing the current version of Xcode used to build the stuff from command line becomes a useful intel. Here is the recipe on how to obtain this information in a clean manner. Easiest command would be to call: $ xcodebuild -version That produces output like: Xcode 12.5 Build version 12E262 As an improvement I could use sed to simply extract the number from a line with the Xcode prefix: Read more →

HowTo: Select running iOS simulator while automating testing

One thing was always a dilemma for me - running iOS automated unit-test from a command line. On the first look the command looks simple, it’s just a call to xcodebuild with a bunch of parameters. What can go wrong there, right? $ xcodebuild -resultBundlePath "$test_results_path" -workspace "$workspace_path" -scheme "$scheme_name" -sdk "$sdk_version" -destination '$destination' -testPlan "$plan_name" -only-testing:'$single_test_path' test Where: test_results_path - describes the path, where to store test outcomes (.xcresult bundle). Read more →

HowTo: Remove GiT remote branch

Things has been simplified over time and my old guide about Git Commands has been improved a bit. At least in the context of removing remote branches. Now, it’s as easy as passing --delete parameter along with pushing changes to the server. git push origin --delete <remote_branch_name> Response will look like following: To - [deleted] <remote_branch_name> What is even more beautiful in this syntax is that it also works for remote tags! Read more →

Customized ZSH prompt with Git info

Probably first thing you noticed after installing macOS Catalina is that the default shell changed from bash to zsh. I decided to give it a try. Although there is an easy way to revert it back to bash (as its package is still part of the OS distribution) by invoking following command in terminal: chsh -s /bin/bash My hope was, maybe this small update will inevitably influence my usage comfort, performance and maybe, maybe improve my daily routines (as I spend most of the day working in command-line mode). Read more →

HowTo: OS upgrade on Raspberry Pi 4

The process of system upgrade is very easy and was already described here. This is a really great guide. I just want to add few comments, that affected my installation. The main actions to perform to install latest version of Raspbian are: Go to and check the latest OS codename. Verify, if this version is not already installed on the Raspberry using cat /etc/os-release command. $ cat /etc/os-release PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)" NAME="Raspbian GNU/Linux" VERSION_ID="9" VERSION="9 (stretch)" VERSION_CODENAME=stretch ID=raspbian ID_LIKE=debian HOME_URL="http://www. Read more →

GitLab on Raspberry Pi not updating

I recently noticed that my GitLab installed on Raspberry Pi (running Jessy) stopped updating and stick to version 8.7.9, however the latest one as of today is 8.16.4. Normally apt-get updateand **apt-get upgrade**should do the trick. But it turned out there was a change in the build system and newer packages don’t get uploaded into ‘raspbian’ version of repository. For details - take a look on issue #1303. Although quick patch is following and short: Read more →

TeamCity – advanced application version patcher

I am a really big fan of JetBrain’s TeamCity product. I use it a lot at work and also for my hobby projects. But unfortunately I found it lacks one important, yet very basic feature – proper (and easy) application version management. Someone might say, that this is not totally true, there is a build-in AssemblyInfo Patcher. Yes, OK, although this one is extremely limited and can mostly be used for very simple projects, created by Visual Studio New Project Wizard and never modified. Read more →

Minimizing size of VHD on Windows

Virtual hard-drives used by virtual systems running under Hyper-V on Windows 8 Pro (or later) can very quickly become extremely huge in size. Thankfully there is a nice and easy procedure that I always use to minimize and compact them, which presents as following: Turn on the system, that is going to be optimized and log in. Clean the trash bins, clean temp folders and remove all other unneeded stuff from the system drive (like: old system restore points), turn off hibernation and finally turn off or reduce the size of paging file. Read more →

GiT Cheat Sheet – Commands

GiT is a marvelous tool. It’s like a developer’s tool shaped into Swiss knife. It pays back to have it, yet you still need a bit of training not to make yourself hurt (like lose whole day’s work!). Or most importantly training to know, what is the command’s name for the task you are going to do. Those commands are not very obvious, somehow Mercurial and SVN did a better job here, that’s why I am providing my own list in this short tutorial. Read more →