Live data from Hacker News

Show HN: Blink my keyboard lights when you visit this page

lelandbatey.com

1–10 of 23 posts

Re: Show HN: Blink my keyboard lights when you visit this page

#2
Btw, if you want your keyboard lights to blink whenever my server receives an HTTP request, you can do that like so:

    go install github.com/lelandbatey/watchserver/...
    sudo watchclient --host lelandbatey.com
You have to run sudo for that binary to function correctly, since the syscall to light up keyboard buttons requires root.

Re: Show HN: Blink my keyboard lights when you visit this page

#3
Random Linux trivia/story: Back in 2002, I was trying to measure the impact of various long-held spinlocks in the kernel. By random chance, I noticed there was a huge latency spike when I enabled caps-lock. It turns out that it takes about 7 milliseconds to turn a PS/2 keyboard's caps lock LED on (or any of the other LEDs), and the kernel stops what it's doing and waits for it to complete regardless of whatever else it could be doing.

There's a command-line tool to turn the LEDs on or off (I forget what it's called), so I integrated that into a test script we used that measures timer latency with various background loads. (We had our own high-resolution timer implementation based on the APIC.)

http://jsnow.bootlegether.net/rtas2002.pdf

Re: Show HN: Blink my keyboard lights when you visit this page

#7
This is very neat!

I created an Erlang script that allows you to send messages by morse code to the keyboard like this:

  ./remote_morse "HI,IAMSAM."
(Spaces don't appear to be used in morse code?)

The messages won't be differentiable while the site is under HN-level traffic, but in a few months, you should be able to send arbitrary messages to @lelandbatey using this.

The code is available here: https://gist.github.com/samcamwilliams/19339ea2d8431f27728ec...

Re: Show HN: Blink my keyboard lights when you visit this page

#8
This is awesome! I believe it was Bob Metcalf at PARC had a box in his office that would go 'click' when there was a collision on the network. At the time there was great debate that a network where packets could collide would ever be useful (the big competitor, token ring, use to harp on this endlessly). So he rigged it up to click when there were collisions. It sounded a bit like a geiger counter but the relevant bit was it did not sound like a buzz saw (all collisions all the time).

The idea of having a light go off when your network sees certain packets sounds like it could be an art project for a Raspberry Pi :-)

Re: Show HN: Blink my keyboard lights when you visit this page

#9

Btw, if you want your keyboard lights to blink whenever my server receives an HTTP request, you can do that like so: go install github.com/lelandbatey/watchserver/... sudo watchclient --host lelandbatey.com You have to run sudo for that binary to function correctly, since the syscall to light up keyboard buttons requires root.

Now I've got a stupid urge to write a SELinux policy for this so you can safely run it setuid (I need some practice anyway).

Re: Show HN: Blink my keyboard lights when you visit this page

#10

This is very neat! I created an Erlang script that allows you to send messages by morse code to the keyboard like this: ./remote_morse "HI,IAMSAM." (Spaces don't appear to be used in morse code?) The messages won't be differentiable while the site is under HN-level traffic, but in a few months, you should be able to send arbitrary messages to @lelandbatey using this. The code is available here: https://gist.github.co…

Spaces are represented as a pause between two characters.
Post reply on HN