Thursday, November 27, 2014

Validating json files with python command line

If you ever want to validate a json file and you have not a json parser installed, you can always use python for the purpose: python -m json.tool < data.json
You can also use this approach to pretty print a mangled json file.

Sunday, November 23, 2014

Browsing through ocaml packages

You can always use ocamlfind, but there is also a gui tool called ocamlbrowser. The graphics are not great but it seems to be a convenient tool.

Friday, November 7, 2014

The prince

Reading this book, by Nicolo Machiavelli. If nothing else i may gain some insight in how politician see the world.

Sunday, November 2, 2014

go to specific column with vi

We know that if you want to go to line 30 you just need to type :30
similarly if you want to go to column 30 in the current line you are, you just type 30|

Changing user with su does not allow you to run X apps

It happens whenever you su to a different account on the same machine. The X session details are not inherited by the new user, so you do not have access to the X session.

The solution is to use xhost like this:

> xhost
access control enabled, only authorized clients can connect
SI:localuser:nickapos

activate xhost, and then add the new user that needs to run xapps:


>xhost +si:localuser:nickapostolakis
localuser:nickapostolakis being added to access control list


verify by re-running xhost:

> xhost
access control enabled, only authorized clients can connect
SI:localuser:nickapostolakis
SI:localuser:nickapos