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'
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.
Read More
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
awesome global shortcut
The awesome window
manager does not
provide GUI
configuration tool.
Here is a litte how to to provide a feature using global shortcut,
illustrated with wolume control.
Defining and identifying the feature and the shortcut
The wanted feature is usually accessible via the
CLI . For …
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