[21-04-2017]

requested Java version ((null)) not available. Using Java at “” instead

If you are getting following errors while trying to install xlsx package in R (macOS) > library(xlsx) Loading required package: rJava Error : .onLoad failed in loadNamespace() for ‘rJava’, details: > library(xlsx) JavaVM: requested Java version ((null)) not available. Using Java at “” instead. JavaVM: Failed to load JVM: /bundle/Libraries/libserver.dylib JavaVM FATAL: Failed to load […]


[12-04-2017]

Enforce LANG settings in R – macOS

defaults write org.R-project.R force.LANG en_US.UTF-8


[07-04-2017]

What if you want to modify Makefile content while building your code

Well, it’s possible. Let’s say we have directory with source code: main.cpp Source code is supper simple. What we want to do is to run Makefile and make sure that all occurrences of main will be changed to directory name (e.g. myCode). All we have to do is to get location of Makefile, update it, […]


[07-04-2017]

Change file name to directory name

OK, I am not sure whether anybody really needs something like this. But, in case you want to change your executable name to the same name as your directory name, try this BASENAME := $(notdir $(CURDIR)) all: copy exe copy: @cp main.cpp $(BASENAME).cpp exe: copy $(BASENAME).cpp gcc -o $(BASENAME).o $(BASENAME).cpp


[05-04-2017]

/bin/sh: @echo: command not found

If you get this one, remember about missing new line after shell call that spans over multiple lines that are split with \. You will get this error in case you don’t add explicit new line and you want to silence the command using @ symbol at the same time. LIST=a b c d all: […]


[14-03-2017]

Running Open MPI on macOS

I am, generally, against all these automation stuff (brew, etc.) at macOS. I prefer to install everything from sources (as long as it is possible). So, here are few steps to get Open MPI up and running at macOS. Please make sure to download source package from: https://www.open-mpi.org/software/ompi/v2.0/downloads/openmpi-2.0.2.tar.gz. # put this file somewhere inside your […]


[06-03-2017]

Get all hidden files inside $HOME

Simple one liner that helps to find all config locations inside your HOME directory ls -a1 $HOME | grep ‘^\.’


[17-02-2017]

In case you like more bass, the same way I do ;)

iTunes -> Windows -> Equaliser # alternatively: Option + Command + E


[17-02-2017]

apps keep asking for key chain access

1. Open Key Chain Access and unlock all key chains 2. use security utility to set timeout for keychain security -v set-keychain-settings -t 72000 login.keychain You can read more about security using man man security


[12-02-2017]

Scratch Coding Cards by Natalie Rusk

Summary: So far, the best Scratch Coding resource I have found :) “Old school” way of learning (one that industrial era developed) is based on reading. To know something, you have to read something. Well, that’s not always the best idea. And let me remind you, that an old philosopher, long, long time ago in […]


[06-02-2017]

ldd in macOS

otool -L libFile.dylib


[13-01-2017]

Redirecting http traffic

Sometimes, simple solutions are the best > iptables -A PREROUTING -t nat -p tcp –dport 80 -j REDIRECT –to-port 8888 > iptables -t nat -I OUTPUT -p tcp -o lo –dport 80 -j REDIRECT –to-ports 8888 # in case we want to list what we have > iptables -t nat -nvL –line-numbers # if we […]


[06-01-2017]

Mr. Robot – some thoughts about bugs

Most coders think debugging software is about fixing a mistake, but that’s bullshit. Debugging’s actually all about finding the bug.


[28-12-2016]

Coding apprentice – TODOs

Coding apprentice: – Hi there. Well, you know, there are lots of TODOs inside code. What does it mean, really? Is it: This One Datelessly On-site?


[16-12-2016]

If you have makefile that has weird name but you still want syntax highlighting

:set syntax=make


[15-12-2016]

makefile – all you wanted to know about variable but were afraid to ask

Sometimes, all you need is a simple solution for checking whether variable you really (really!) need is already defined. assert = $(if $2,$(if $1,,$(error $2))) all: $(call assert,$(VARIABLE),VARIABLE is not defined) Stolen from: http://gmsl.sourceforge.net and found here The GNU Make Book


[15-12-2016]

makefile – know your location

If you want to know where you really are during Make location = $(CURDIR)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) $(warning $(location)) Source: unknown Stack Overflow user


[08-12-2016]

Scratch Programming Playground by Al Sweigart

Summary: Great introduction to Scratch So, you probably wonder where to start your adventure with Scratch. Don’t look any further. You have just found what you were looking for. Let me be straight here. This book is perfect read after finishing Super Scratch Programming Adventure! (published by No Starch Press). Supper Scratch Programming Adventure will […]


[07-12-2016]

Two line prompt with colors and gadgets

To get this use this # bash red=”\[\033[1;31m\]” green=”\[\033[0;32m\]” yellow=”\[\033[1;33m\]” blue=”\[\033[1;34m\]” magenta=”\[\033[1;35m\]” cyan=”\[\033[1;36m\]” white=”\[\033[0;37m\]” end=”\[\033[0m\]” export PS1=”${white}┌[${green}\u${blue}@${green}\h${white}]\n└[\w]${end} ” # tcsh set red=”%{\033[1;31m%}” set green=”%{\033[0;32m%}” set yellow=”%{\033[1;33m%}” set blue=”%{\033[1;34m%}” set magenta=”%{\033[1;35m%}” set cyan=”%{\033[1;36m%}” set white=”%{\033[0;37m%}” set end=”%{\033[0m%}” set prompt=”${white}┌[${green}%n${blue}@%m${white}]\n└[%~]${end} “


[06-12-2016]

mwm confing for people who like minimalism during remote work

Here comes my supper ascetic ~/.mwmrc I use on regular basis. Menu RootMenu { "Root Menu" f.title "Terminal – urxvt" f.exec "/afs/eufus.eu/g2itmdev/user/g2michal/opt/usr/local/bin/rxvt &" "Terminal – Konsole" f.exec "/opt/trinity/bin/konsole &" "Shuffle Up" f.circle_up "Shuffle Down" f.circle_down "Refresh" f.refresh no-label f.separator "Restart…" f.restart no-label f.separator "Quit…" f.quit_mwm } Buttons DefaultButtonBindings { <Btn1Down> icon | frame f.raise <Btn2Down> […]