[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. and ~/.Xresources as well And here is the resulting MWM session :)


[23-09-2016]

Makefile that calls itself without hardcoding file name

If you have to call makefile multiple times. And you don’t want to hardcode file name you can make it following way: makefilelocation = $(CURDIR)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) all: $(warning “I will call myself”) $(MAKE) -f $(makefilelocation) message message: $(warning “Hello message”) Remember that targets are indented with tabs :) Then, just call it following way: […]


[21-09-2016]

History repeats itself – or, applying law of series to Computer Science ;)

Some time ago I had this, quite bad, experience of upgrading OS X. It ended with horrible disaster. I have lost all my data from my HD. As I am super paranoid about data and backups, loosing all my data was not a big deal. I always have my daily backup running (external HD), I […]


[21-08-2016]

Scala – the “successor” of C

class __(__ : String) { def ___ = __ def ____(____ : __) = ___ + ____.___ } new __(“_”) ____ new __(“_”)


[04-08-2016]

Path Finder 7 – Norton Commander like layout

If you are using Path Finder 7 make sure to press Command + J (⌘ + J) and then set following settings (pay attention to “All windows” at the top).


[03-06-2016]

Scratch w szkole – Zadanie 008 (rozwiązanie)

Poniżej rozwiązanie zadania 008 ze Scratcha Zadanie 008 – rozwiązanie A dla osób które wolą pooglądać niż poczytać, rozwiązanie na youtube, ale jeszcze nie dziś ;)


[31-05-2016]

DevOps pessimist vs. optimist

Pessimist: tmux make >& make.log make install >& make_install.log Optimist: make; make install >& /dev/null


[31-05-2016]

svn: Aborting commit: ‘/directory’ remains in conflict

It’s as simple as that. You have something you want to delete. You know you don’t want it at all, but SVN keeps complaining. svn: Aborting commit: ‘directory’ remains in conflict Do not fight, do not struggle, don’t try to find the source of the issue, don’t even think about trying to understand it :) […]


[29-05-2016]

Building tmux on OS X

You will need: libevent-2.0.22 – link openssl – https://github.com/openssl/openssl.git tmux – https://tmux.github.io # at first, compile and install openssl git clone https://github.com/openssl/openssl.git cd openssl ./config –prefix=$HOME/opt/usr make; make install # then, compile and install libevent curl https://github.com/libevent/libevent/releases/download/\ release-2.0.22-stable/libevent-2.0.22-stable.tar.gz\ -O libevent-2.0.22-stable.tar.gz tar zxf libevent-2.0.22-stable.tar.gz mv libevent-2.0.22-stable libevent cd libevent # Note, you may experience some issues […]


[29-05-2016]

iTerm 3 and Docker incompatibility

If you try to use iTerm 3 (beta) together with Docker, make sure to take a look at this link.


[29-05-2016]

Scratch w szkole – Zadanie 008

To będzie jedna z ostatnich gier jakie napiszemy podczas zajęć. Tym razem, klasyczny, 8-mio bitowy Frogger. Zadanie będzie o tyle łatwe że nie będziemy używali niczego poza tym, co już poznaliśmy. A zestaw bloczków jest tym razem naprawdę prosty. W trakcie zajęć dodamy jeszcze jeden, który będzie niespodzianką. Tym razem, zadanie wyglądało tak. Najpierw trzeba […]