Hackaday-proofing Your Hackerspace’s Server

Last month we posted a tutorial from Hub City Labs on making your own PCBs at home. At the time, Hub City was hosting their hackerspace web site on a tiny vps graciously provided by a member. As you might expect, the throngs of Hackaday readers turned Hub City Labs’ server into a pile of molten slag and made their admin’s hair a little more gray. Their web site is up again, and Hub City provided a tutorial on protecting your server from the ravages of being Slashdotted, Farked, Reddited, and even Hackaday’d.

The solution for the first few hours was to transfer Hub City Labs’ site to an Amazon EC2 instance. Since then, they’ve moved over to a Debian EC2 instance that is able to handle half a million pageviews an hour for a WordPress site.

This amazing capability required a good bit of optimizations. A WordPress installation is set to run cron tasks on every page load; not good if you’re going to see thousands of hits every minute. The guys added define(‘DISABLE_WP_CRON’, true) to their wp-config.php file and set all the background tasks – checking to see if a page should be updated – to a fixed schedule every minute or so. Along with an increase in the WordPress cache, these optimizations increased the number of pageviews an hour from 1500 to 60000.

To get up to half a million pageviews an hour, the EC2 instance was loaded up with Varnish, a front-end cache that really speeds things up.

The result – 375 million pageviews for $15 a month – is more than Hub City Labs will probably ever need. The nature of hackerspace web sites, though – light load until Hackaday, Slashdot, or Reddit figure out you did something cool – means hosting on an expandable EC2 instance is probably the way to go.

Web IDE For The Raspi

For this month’s release of Adafruit’s Raspberry Pi Linux distribution, [Limor], et al. decided to build a web-based IDE for the Raspberry Pi.

The Raspberry Pi WebIDE is a web server that runs on the Raspi. By connecting to your raspi in a web browser, you’re able to create your own Python programs that are able to interact with the GPIO pins. All the code is stored in the cloud with the help of bitbucket.

The WebIDE is in its early Alpha stage right now; there are a few bugs and minor issues, but in the video after the break, [Limor] shows us it’s possible to push code to a Raspi through the Internet and view the result in a web-based serial terminal.

For fear of editorializing, we have to point out that Adafruit’s web IDE – along with other Arduino web IDEs such as Codebender and the Wifino – work on the cloud. If you’re planning a long-term project that relies on a web-based IDE, you might be in for a world of hurt if only because you can’t host a cloud on a personal server. We’d love to see a package that allows us to have the same functionality as bitbucket on a personal server. If you can find a project that does something similar, or have written your own, send it in and we’ll spread the word.

Continue reading “Web IDE For The Raspi”

Flashing LEDs Protect Livestock From Lion Attacks

When we think of defense against lion attacks, the first thought is usually guns. Lots and lots of guns.  [Richard Turere], a 13 year old Kenyan tinkerer with neither books nor any technical education, has come up with something entirely different – He’s keeping the lions at bay with a solar powered system of flashing LEDs. Yup. Flashing LEDs.

Since he and his family live next to Nairobi National Park, lion attacks are an ever present danger. The only defense systems available were far too expensive for his family to afford, so he decided to build his own. He utilized the basic resources he had readily available: LED bulbs removed from broken flashlights, some switches, an old car battery, wire, and a solar panel that also operates his family’s TV.

The results speak for themselves. His family has had no lion attacks in over two years, and at least five of his neighbors believe in the system enough to have had him install it on their fences too. With the cost for this set up at less than ten dollars, and all the parts being readily available, this rather basic electrical system is an amazing breakthrough for the Kenyan pastoralists.

We look forward to seeing more of [Richard’s] inventions. Way to go!

Getting A Nest Thermostat To Work In Europe

[Julian] was really excited to get his hands on a Nest learning thermostat. It’s round, modern design will make it a showpiece in his home, but he knew there would be a few hiccups when trying to take advantage of its online features. That’s because [Julian] lives in Spain, and Nest is only configured to work in North America. But as you can see above, he did a bit of hacking to get it displaying his actual location.

The Nest is web-connected and phones home to the company’s server to handle configuration. Since they’ve made the decision to only support a portion of the world [Julian] had to do a little bit of digging to bend it to his will. He used Wireshark to sniff the packets it was sending. The calls to the company’s server use SSL, but the device also contacts the Weather Underground for data and this is not encrypted. So he was able to intercept that with his router and inject custom information. It’s not a full solution, but he’s part way there.

We’d really like to see what is possible with this device so please send us a link to any Nest hacks of your own.

Stcdude Is Linux Friendly ISP Programming Software For STC 8051 Chips

[Andrew] picked up a handful of these big STC 8051 chips for a song and dance. The problem he has with them is the clunky VB6 programming software that only wants to run on a Windows box. He buckled down and wrote his own programming software called stcdude. As you have probably guessed, it’s meant to perform the same open-source functions that avrdude does for AVR chips. It can be used in conjunction with the Small Device C Compiler (SDCC).

It uses an API which is based on Lua script. We think this is to make it easy to interface your own hardware programmer with the software. The package is still quite early in development but it is working and even implements the ability to poll and identify the type of chip based on its stored hardware database. It sounds like he could use a hand. The stock software must still be used for setting the MCU options. We’re not really familiar with the 8051 family but we’d bet that is akin to setting the fuses on the AVR chips. Please let us know in the comments if we’re wrong about that.

There’s A Friggin’ Cellphone In The Most Recent Entertainment Weekly

Hackaday readers were stumbling over each other to send in a link about this Android cellphone inside of an Entertainment Weekly magazine. Thanks to all who sent it in, and keep them coming. We’d rather get too many tips than none at all!

The first thing we should address is the discomfort you will feel while watching the video after the break. If you’ve got any experience tearing open electronics to see what’s inside you will be physically uncomfortable watching this pair bumble through it. It makes us want to do some MST3K-style overdubbing of the video, but their content ownership claim in the description makes us sure we’d get an immediate take-down notice if we did so.

At any rate, what we have here is some really cool tech you almost certainly will not be able to get your hands on. In the image above you can see the small LCD screen to the right. It comes to life when the page is opened thanks to the sliding switch being pointed to in the image. A few television show promos will play before the device starts scrolling items from the CW Twitter feed. When the hardware is pulled out of the pages there’s some interesting tinkering to be done. Shorting the contacts on the keyboard overlay (about 8 minutes into the video) brings up an Asian-language menu which is pretty obviously Android.

This is not the first time the magazine has done something like this. CBS embedded video a few years back but we’re pretty sure that one didn’t use the full guts of a cellphone. It’s just too bad these issues are so rare (only 1000 are available in two cities) as we had a lot of fun hacking that Esquire issue with the epaper in it.

Continue reading “There’s A Friggin’ Cellphone In The Most Recent Entertainment Weekly”

Rube Goldeberg Mixes In Freerunning; Reminds Us Of Human-sized Game Of Mouse Trap

Yep, those are just some shipping containers being used as dominoes in this very impressive Rube Goldberg machine. The apparatus includes a human element, with freerunners making their way through a whole bunch of obstacles. In fact, if you look closely you’ll see the outline of a man who just jumped from the top of each container to get to the ground. The project is a marketing device for Red Bull, who must have shelled out quite a bit for the setup. We’ve embedded the video after the break where you’ll see they went all out with the filming of the device.

To tell you the truth we kind of wish that a Rube-Goldberg build had been the goal of this year’s Redbull Creation Contest. It would have been all but impossible to go this big, but some of the stages (like a suspended bath tub slowly draining its reservoir of water) would have been easy to make happen. Well, there’s always next year!

Continue reading “Rube Goldeberg Mixes In Freerunning; Reminds Us Of Human-sized Game Of Mouse Trap”