Turning a light off over the Internet

Because reaching over a few feet to turn off a switch is too much to bear for [Bruce], he connected his desk lamp to the Internet. It’s a pretty cool build that’s the perfect tutorial for connecting just about anything to the internet.

For his build, [Bruce] used an Arduino with a relay attached to an output pin. When the Arduino receives a signal on its serial port, a tiny voltage is applied to the relay, turning on the light.

This could have been done with an Arduino Ethernet, but the PHP script [Bruce] went with is a little more versatile. Whenever someone pulls up this digital light switch web page, they can turn [Bruce]’s desk lamp on and off.

For an introduction to connecting bare bones projects to the Internet, we’re really liking [Bruce]’s build. Just try no to go crazy with that link and leave the failure testing to the professionals. You can check out the demo video after the break.

[Read more…]

Detecting ASCII art across the Internet

As a web developer and designer, [Victor] has a habit of putting a very nice ASCII signature in an HTML comment at the top of every web page he designs. He was inspired by seeing others do this,  and this piqued his curiosity to see who else was doing this. His idea was to scan through a chunk of the Internet and see what other web pages had ASCII signatures in an HTML comment. With a lot of very clever work, [Victor] managed to grab some interesting ASCII art that would have been missed without looking at the source of millions of web pages.

After gathering a list of the top million top-level domains from Alexa, [Victor] wrote a script to download the HTML for all the pages in parallel. After that, it was just an issue of detecting the ASCII art in all the HTML files. There were a few earlier ASCII art detection algorithms, but nothing that suited [Victor]’s use case. The best result came from only looking at the first comment (otherwise the signatory wouldn’t want you to find it with a quick glance at the source) that were at least 3 lines long and 40 characters wide. After discarding everything with HTML tags in it, [Victor] had an awesome gallery of the ASCII art from webpages all around the Internet.

What did he find? Well, there’s far too many ASCII signatures for [Victor] to put up on his webpage, but he did provide a nice sample of what he found. They’re mostly logos, although there is a Hypnotoad and Aperture Science sentry turret in there.

If you’d like to try out [Victor]’s script, he made everything available on GitHub.