Paste not working the way it should?

Many (if not most) websites are broken in various ways these days. One of the favorite bugs of web developers is breaking copy&paste. For whatever reason pasting text into form fields is not working at all on many websites.

Today gvim was annoying me with a different misfeature: Pasting text with more than one line is always inserted on a new line above the cursor. I want the text pasted where the cursor is, not where vim’s developers think they would like it. That’s the last straw.

To solve this problem for all times I wrote a small script which converts the paste buffer into keystrokes. For all applications it will look as if that text has been entered with the keyboard. Here is the code of my Download it and bind it to a key, for example Tux+V (Windows+V) or any other key you like.

Now always when I press Tux+V I get the contents of the copy buffer pasted exactly how I want it.

UDEV rule for USBASP

Again I got permission denied to access USBASP using avrdude. To fix this an UDEV rule has to be created.

A long time ago I created the file /etc/udev/rules.d/99-USB-AVR-PRG.rules with the following content:
# see:
# udevadm info -a -p /sys/bus/usb/devices/3-1
# After a change restart udev:
# systemctl restart udev.service

# borked rule
# Atmel AVR ISP mkII
#SUBSYSTEM=="usb", SYSFS{idVendor}=="03eb", SYSFS{idProduct}=="2104", GROUP="users", MODE="0660"

# usbprog bootloader
#ATTRS{idVendor}=="1781", ATTRS{idProduct}=="0c62", GROUP="users", MODE="0660"

# USBasp programmer
ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05dc", GROUP="users", MODE="0666"

# USBtiny programmer
#ATTRS{idVendor}=="1781", ATTRS{idProduct}=="0c9f", GROUP="users", MODE="0660"

Most of the content is shamelessly copied and then commented out, then for me the only interesting line is the one for USBASP.

After copying the file I restarted UDEV with the following command:
systemctl restart udev.service

Now after plugging in USBASP the device should get the appropriate permissions.

How to Create a Verified E-Aadhaar Card PDF on Linux

The E-Aadhaar Card PDF which can be downloaded from the UID Authority of India contains a signature and some brain damaged verification code. In the middle of the page on the right side it shows “Not verified”, a yellow question mark and some more text about the digital signature. This question mark has to be clicked which then verification process. When this process is finished the question mark is replaced by a green tick and the text reads “Signature valid”. Since everybody just prints the page and deletes the file this verification process is completely superfluous. Since a smart ass wanted to save some money these documents are not signed by a proper key which makes the whole process a bit cumbersome.

The following steps show how to download the Aadhaar Card and convert it to a nice PDF:

Continue reading

“Modern” Webpages Suck

These days almost all the web-morons think they have to fill their webpages with random useless crappy javascript for no reason.

Have a look at one example of many: It consists of static content only, nothing that would justify the use of javascript. But anyway they thought it is clever to add tons of it:

wget -q -O - \ \ \ \ \ \ \ \ \
| wc -c

This is almost 140kB of javascript, more than the source text files which are around 100kB for the whole tutorial. Each page contains around 5kB content, so the ratio between javascript and content is 28:1 !

Another big problme is, that the code is written by gardeners or lumberjacks, but not by IT professionals. The bugs in the code make it very unreliable. For example on Aliexpress I get the following message pretty often: Due to network reasons , adding that fails, re-click the "Add to Wish List". But clicking “add to wishlist” again and again and again just results in the same error message. The only thing that helps is reloading the page.

But there are more drawbacks of using javascript, here is an incomplete list:

  • Javascript leads to more bandwith used which:
    • makes the webpage loading slower,
    • causes more load on the server,
    • causes more costs for the bandwith of the server,
    • and uses up the megabytes of my connection which I have to pay!
  • Javascript wastes the memory of my computer which I could better use for productive work.
  • Javascript executes slow and makes me yawn because of the very slow user experience. Many websites are completely unusable on slower machines.
  • Javascript code is neither security reviewed nor signed, it is completely untrusted code running on my machine.
  • Javascript is generally written by hobbyists with not much CS knowledge. That’s one reason these pages are very unreliable.
  • Javascript is often used to make very stupid things like breaking the back button or copy&paste. I don’t know if that is just a result of the stupidity of the coder or if it is done intentionally, no matter why it is done, it is very bad and annoying.
  • Javascript is most of the time written by amateurs, not by well educated IT professionals. Obviously nobody who is at least a little bit sane would want to write code in such an awful language.
  • Javascript code is never tested thoroughly. Or have you ever heard of someone writing a test suite for his webpage?
  • There are probably a lot more…

So please make the world a better place by limiting the use of javascript to only those cases which really need it.

Thank you.

Shutdown delayed by Avahi mDNS/DNS-SD using systemd

Sometimes systemd feels the urge to wait 2 minutes for some service which makes troubles and then continues to boot or shutdown. Two minute timeout is hopeless insane for this default configuration, even 5 seconds feels like endless waiting.

The timeout can be set in /etc/systemd/system.conf. Just add the following lines or change them if they already exist:

This Avahi mDNS daemon is for zeroconf. Just uninstall this bloody crApple rubbish:
apt-get remove --purge avahi-daemon

Another annoying delay is caused by the network code trying to get an IP address over a NIC where no cable is plugged in. I have no solution for this problem yet, but with lower timeout it’s not that awful anymore.

Thank You Facebook!

Today I got an email with link to a facebook page. Actually I’ve seen this link before but ignored it because it links to facebook. But today I opened that page. I was reading a bit, following some links to other pages, coming back, reading more. And suddenly I got this:

This sucks. Why should I login after this page has been showed for 5 minutes? Additionally you can see how completely retarded facebook is: The text on the page is in german, some navigation help texts are in Kannada and the login window is in english.

First I thought “facebook sucks” and started searching for other complaints about facebook. But facebook (and google+ and twitter and…) collect all the braindamaged morons which were annoying everybody in IRC 10 years ago. Now IRC is again the nice and friendly place it was 20 years ago.

Thank you Facebook!

Multimeter Upgrade

What is worse than a battery powered multimeter?

A battery powered multimeter with an empty battery.

That’s why I have to upgrade this multimeter with a power socket, a step-down converter to support a wide input voltage range, and an isolated DC-DC converter to isolate the input voltage from the multimeter circuits.

Continue reading