UTF8, base64 and other encoding conversion
[caption id="" align="alignright" width="100" class="zemanta-img"] encoding conversion (Photo credit: Wikipedia)[/caption]
A common way to represent binary files in ascii-only diplay is to use base64. This is also done a piece of software does not handle unicode: it manipulate its base64 representation.
6YCZ5YCL57ay56uZ5piv576O6bqX55qECg== and dGhpcyB3ZWJzaXRlIGlzIGJlYXV0aWZ1bAo=
- to text/unicode:
echo '6YCZ5YCL57ay56uZ5piv576O6bqX55qECg==' | base64 -d
echo 'dGhpcyB3ZWJzaXRlIGlzIGJlYXV0aWZ1bAo=' | base64 -d
- to text/unicode:
echo '6YCZ5YCL57ay56uZ5piv576O6bqX55qECg==' | base64 -d | xxd -p -i | sed -e's/, //g'
echo 'dGhpcyB3ZWJzaXRlIGlzIGJlYXV0aWZ1bAo=' | base64 -d | xxd -p -i | sed -e's/, //g'
- from hex:
echo 'e98099e5808be7b6b2e7ab99e698afe7be8ee9ba97e79a840a' | xxd -p -r
- mix hex and ascii to ascii:
echo -e 'this\x20website\x20is\x20bueatiful'
loop devices
Loop devices are used to acces any file as if it were a block
device such as a disk. On
GNU/linux, the canonical command to interact with loop devices is
losetup . To list the next
usable loop device :
losetup -f
disk image loop mount …
Read More
udev, systemd, laptop, power management and backlight brightness
[caption id="" align="alignright" width="218" class="zemanta-img"] Laptop problem (Photo credit: Wikipedia)[/caption]
My two problems with my laptop are the following:
- I want to control the backlight brihtness of my screen even if I don't start the graphical desktop (i.e. work with tty)
- I want to be …
Read More
berry pie cooked with rasp: init
[caption id="" align="alignleft" width="100"] Rasp (Photo credit: Wikipedia)[/caption]
[caption id="" align="alignright" width="100"] berry pie. (Photo credit: Wikipedia)[/caption]
I just bought the second cheapest computer in the world in 2014 (the cheapest being the raspberry pi model A). Here is my little experience with it …
Read More
chroot pre/post requests
[caption id="" align="alignright" width="350"] changed roots (Photo credit: Wikipedia)[/caption]
The chroot command is quite simple but I almost always forget all the prerequest and post-chroot checks that should be done to have a fully operational chrooted environment.
The, chroot operation consist in changing the apparent root of …
Read More
yacy installation
I have some troubleshoot installing one of my prefered web search
engine yacy . My
best advise would be to install in on a debian running computer. The
package is OK, the default configuration run well, and you just start is
as every other service
Read More
One year onto an arch
Arch bridge (Photo credit: Wikipedia)
About one year ago, I decided to test
archlinux. Now, I think I made my mind about it.
I must precise that I previously used
Debian, and even previously I used
ubuntu. I migrated from ubuntu to debian in 2008 because it was too automated …
Read More