Author Archives: NAB

Deep Clone From Super Class

Ever had to create an object from another object being super class of the first one? You could just copy each attribute from one to another but that’s pretty annoying if there’s a lot of attributes. I stumbled upon a generic way and like to share it.


Change Mac Address on MacBook Air/Pro (Spoofing)

I recently had an issue changing mac address on my MacBook Air. Here’s how to change mac address to a random one keeping first three digits (otherwise it won’t work). tl;dr: $ networksetup -getmacaddress en0 | awk ‘//{“openssl rand -hex 3” | getline mac; sub(“(:..){3}$”, mac, $3); print $3}’ | sed ‘s/://g; s/\(..\)/:\1/g; s/^://’ | […]


IntelliJ IDEA Application Variables in Config Files

I was missing a list of variables set by IntelliJ IDEA while parsing configuration files. I’ve found following variables (most likely not complete): $APPLICATION_HOME_DIR$ $APPLICATION_PLUGINS_DIR$ $USER_HOME$

Categories: Stuff


Extract Maven Dependency Version as Property

Problem: You got a lot of <version> tags in your Maven pom.xml that you want to centralize in <properties> section. Solution: Use an editor with greedy RegEx functionality like Notepad++ 5.9+ to find and replace.

Categories: Stuff

Rescue Data via Recovery Mode in macOS

I recently had to help a friend of mine rescuing some data from her MacBook’s hard drive. Upgrading macOS from Yosemite to Sierra failed and her last TimeMachine backup was a month ago – still better than mine a year ago… Here’s what we’ve done to save her data from MacBook’s internal to an external […]


Improving HTTPS Website Security Level

HTTPS finally spreads around the web and is getting more and more the de facto standard for websites. A few months ago Mozilla released its tool Observatory for testing website security level. It rates in form of grades from A+ (best) to F (worst). Following you’d see how to reach an A+ on your website […]



Connect to Server via SSH with Git

Given: an Ubuntu server with central Git repository and connection via SSH and an Ubuntu client with local Git repository. Deposit user’s SSH private key id_rsa in ~/.ssh (aka /home/user/.ssh) chmod 0600 ~/.ssh/id_rsa to prevent other users reading user’s private key If you also want to use Git with root user: cp /home/user/.ssh/id_rsa /root/.ssh/ Connect […]