Tuesday, December 26, 2017

Opensource platform for building blockchain applicateins

I stumbled on this project https://www.multichain.com/
There are quite a few blog posts, in the website about the platform and some interesting presentations:

https://www.multichain.com/blog/2017/04/video-difference-blockchain-database/

Sunday, September 24, 2017

Systemd not so known options

We use systemd all the time to restart services and query for their status, but it can do a lot more than just that.

It can be used to analyse the boot time of the system (systemd-analyze), to display realtime information of the processes in a top like manner (systemd-cgtop), display the status of the whole system in a tree like manner (sudo systemctl status) and many more.

Of course none of these is new, you can do this in a number of different ways, but it seems systemd is replicating a number of other tools.

Tuesday, April 25, 2017

Following a symbolic link in linux

Sometimes a link is pointing to a link, that is pointing to a link etc. It is a pain to resolve all the links and find which is the final file.
But there is a command that you can use to make things easier, and it is called readlink.

readink -f filename will traverse all the paths and print out the final filename

Saturday, March 4, 2017

Moving a zfs pool from one disk to another

If we want to move a zfs pool with their full layout from one disk to another we can use the following approach

zfs snapshot -r pool_A@migrate
zfs send -R pool_A@migrate | zfs receive -F pool_B

zfs unmount oldpool/myfilesystem

And take a new snapshot.

zfs snapshot oldpool/myfilesystem@snapshot2

you can now do an incremental send of the difference between the two snapshots which should be very quick.

zfs send -i oldpool/myfilesystem@snapshot1 \
             oldpool/myfilesystem@snapshot2 | zfs receive newpool/myfilesystem

Wednesday, February 8, 2017

Converting markdown presentation to pdf

If we want to convert a presentation from markdown to pdf, while keeping the slide format we can use the following command:

pandoc -t beamer -s -o habitat-presentation.pdf habitat-presentation-pdf.md 

Saturday, January 21, 2017

Resuming an interrupted scp tranfer

If we stop an scp tranfer, we can resume it by using rsync in the following way:

rsync -P -e ssh local_file user@host:remote_file

We can also do a full wildcard transfer on a custom port by using the following:

rsync -r -v -P -e "ssh -p 2222" "test.oncrete.gr:*" .

If we want to rate limit the transfer we can use the --bwlimit=50 option with the speed in kb/sec

Thursday, December 22, 2016

Copying streams to video/audio files using vlc

If you ever need to save a stream (either audio or video) to a file, you can do it by using vlc.

You will find more details here: http://www.dedoimedo.com/computers/vlc-streaming.html