[21-04-2017]
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]
defaults write org.R-project.R force.LANG en_US.UTF-8
[07-04-2017]
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]
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]
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]
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]
Simple one liner that helps to find all config locations inside your HOME directory ls -a1 $HOME | grep ‘^\.’
[17-02-2017]
iTunes -> Windows -> Equaliser # alternatively: Option + Command + E
[17-02-2017]
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]
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]
otool -L libFile.dylib
[13-01-2017]
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]
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: – 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]
:set syntax=make
[15-12-2016]
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]
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]
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]
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]
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> […]