UTF8, base64 and other encoding conversion

Sat 30 April 2016

[caption id="" align="alignright" width="100" class="zemanta-img"]A/D and D/A conversion. 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.

Let's take as example this 2 binary sequence represented in base64:
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'

Category: tools Tagged: ASCII Base64 Binary file Linux Unix-like tools unix-like


awesome global shortcut

Mon 04 January 2016
Multimedia keyboard

Multimedia keyboard (Photo credit: Wikipedia)

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 …

Category: how to Tagged: alsa ArchLinux awesome Configuration file FAQs Help and Tutorials Unix window manager tools unix-like

Read More
Page 1 of 1