LinuxPlanet

Syndicate content
By Linux Geeks, For Linux Geeks.
Updated: 5 hours 38 min ago

Flux Capacitor Notification Light Hack

Thu, 2015-02-12 02:00

I modded my Flux Capacitor USB Charger and turned it into an instant notification widget.

It can now be controlled through WiFi, which comes in handy when I get pinged on IRC or get important email.

Hack

I replaced the resistor used to power the flux circuit with a 3v3 SMD regulator that fit the resistor’s footprint. The regulator now powers both the flux circuit IC and the ESP8266 module.

GPIO2 and GPIO0 in the ESP8266 module are used to toggle the flux circuit and keep state respectively. Using custom firmware, GPIO2 is pulled low for half a second when we need to toggle the flux circuit. This is accomplished by connecting to the ESP module via TCP and sending one of the following commands:

TIME CIRCUIT ON TIME CIRCUIT OFF

When the flux circuit fluxes, the cathode-side of the LEDs is pulled low; I hoked up GPIO0 to the cathode of one of the LEDs and made it interrupt on falling edge. When the interrupt is triggered I set the internal state to fluxing, an internal timer is restarted every time the LED is turned on. When the time circuit is turned off, the timer expires and sets the state back to off.

Just in case it wasn’t obvious, we need to know if the time circuit is ON or OFF so that we don’t toggle it OFF when we want it to be ON by mistake.

Components
Categories: FLOSS Project Planets

Trade Associations Are Never Neutral

Tue, 2015-02-10 11:15

It's amazing what we let for-profit companies and their trade associations get away with. Today, Joyent announced the Node.js Foundation, in conjunction with various for-profit corporate partners and Linux Foundation (which is a 501(c)(6) trade association under the full control of for-profit companies).

Joyent and their corporate partners claim that the Node.js Foundation will be a neutral and provide open governance. Yet, they don't even say what corporate form the new organization will take, nor present its by-laws. There's no way that anyone can know if the organization will be neutral and provide open governance without at least that information.

Meanwhile, I've spent years pointing out that what corporate form you chose matters. In the USA, if you pick a 501(c)(6) trade association (like Linux Foundation), the result is not a neutral non-profit home. Rather, a trade association simply promotes the interest of the for-profit businesses of that control it. Such organizations don't have the community interests at heart, but rather the interests of the for-profit corporate masters who control the Board of Directors. Sadly, most people tend to think that if you put the word “Foundation” in the name0, you magically get a neutral home and open governance.

Fortunately for these trade associations, they hide behind the far-too-general term non-profit, and act as if non-profits are equal. Why do trade association representatives and companies ignore the differences between charities and trade associations? Because they don't want you to know the real story.

Ultimately, charities serve the public good. They can do nothing else, lest they run afoul of IRS rules. Trade associations serve the business interests of the companies that join them. They can do nothing else, lest they run afoul of IRS rules. I would certainly argue the Linux Foundation has done an excellent job serving the interests of the businesses that control it. They can be commended for meeting their mission, but that mission is not one to serve the individual users and developers of Linux and other Free Software. What will the mission of the Node.js Foundation be? We really don't know, but given who's starting it, I'm sure it will be to promote the businesses around Node.js, not its users and developers.

0Richard Fontana recently pointed out to me that it is extremely rare for trade associations to call themselves foundations outside of the Open Source and Free Software community. He found very few examples of it in the wider world. He speculated that this may be an attempt to capitalize on the credibility of the Free Software Foundation, which is older than all other non-profits in this community by at least two decades. Of course, FSF is a 501(c)(3) charity, and since there is no IRS rule about calling a 501(c)(6) trade association by the name “Foundation”, this is a further opportunity to spread confusion about who these organization serve: business interests or the general public.

Categories: FLOSS Project Planets

Recursively dumping the structure of an HTML5 document

Mon, 2015-02-09 14:49
By Vasudev Ram





A while ago I had written this post,

The html5lib Python library (and Animatron :-)

which shows basic usage of a Python library called html5lib, that lets you parse HTML5 documents and then walk through their structure.

That post uses this HTML5 document as input for the program shown in it:


Yesteday I modified the program (test_html5lib.py) shown in that earlier post, to make it recursive, thereby simplifying it. Here is the code for the resulting program, html5_dump.py.
# Demo program to show how to dump the structure of
# an HTML5 document to text, using html5lib.
# Author: Vasudev Ram.
# Copyright 2015 Vasudev Ram - http://www.dancingbison.com

import html5lib

# Define a function to dump HTML5 element info recursively,
# given a top-level element.
def print_element(elem, indent, level):
for sub_elem in elem:
print "{}{}".format(indent * level, sub_elem)
# Recursive call to print_element().
print_element(sub_elem, indent, level + 1)

f = open("html5doc.html")
# Parse the HTML document.
tree = html5lib.parse(f)
indent = '----'
level = 0
print_element(tree, indent, level)
I ran the program with:
$ py html5_dump.py

where the py in the command refers to py, the Python Launcher for Windows

Here is the program output, which you can see is basically the same as the previous version, but, done using recursion.
<Element u'{http://www.w3.org/1999/xhtml}head' at 0x02978938>
<Element u'{http://www.w3.org/1999/xhtml}body' at 0x02978968>
----<Element u'{http://www.w3.org/1999/xhtml}header' at 0x02978980>
--------<Element u'{http://www.w3.org/1999/xhtml}h1' at 0x02978920>
--------<Element u'{http://www.w3.org/1999/xhtml}h2' at 0x02978B00>
--------<Element u'{http://www.w3.org/1999/xhtml}h3' at 0x02978AB8>
----<Element u'{http://www.w3.org/1999/xhtml}p' at 0x02978AE8>
----<Element u'{http://www.w3.org/2000/svg}svg' at 0x02978788>
--------<Element u'{http://www.w3.org/2000/svg}defs' at 0x02A12050>
--------<Element u'{http://www.w3.org/2000/svg}rect' at 0x02A12020>
--------<Element u'{http://www.w3.org/2000/svg}text' at 0x02A12068>
----<Element u'{http://www.w3.org/1999/xhtml}footer' at 0x02A12080>

The recursion helps in two ways: 1) recursively printing sub-elements, and 2) not having to keep track of the indentation level needed - the Python interpreter's handling of nested calls and backing out of them, takes care of that for us. See the line:
print_element(sub_elem, indent, level + 1)
However, if using deep recursion, we have to remember about python recursion depth issues.

Enjoy.

- Vasudev Ram - online Python trainer and freelance programmer

Seeking alpha ...

Signup to hear about my new software products.

Contact Page

Sub-feeds for my posts about Python and posts about xtopdf.

Share | var addthis_config = {"data_track_clickback":true}; Vasudev Ram

Categories: FLOSS Project Planets

pmarca – Marc Andreessen’s blog as an ebook

Mon, 2015-02-09 12:26
By Vasudev Ram




Click image above to skip reading this post and go grab the book :)
Gotta like the Venn diagram on that page.

Saw this today:

Marc Andreessen, a.k.a. @pmarca on the internets, has made many of the good posts from his blog available as an ebook - which is free to download. You can get it here:

The Pmarca Blog Archive Is Back… as an Ebook

The title of the book (in the PDF) is:

The Pmarca Blog Archives

(select posts from 2007-2009)

Excerpt from Marc Andreessen's page on Wikipedia:
[ He is best known as coauthor of Mosaic, the first widely used Web browser; as cofounder of Netscape Communications Corporation;[3] and as cofounder and general partner of Silicon Valley venture capital firm Andreessen Horowitz. He founded and later sold the software company Opsware to Hewlett-Packard. Andreessen is also a cofounder of Ning, a company that provides a platform for social networking websites. ... Andreessen is one of only six inductees in the World Wide Web Hall of Fame announced at the first international conference on the World Wide Web in 1994 ]

Just downloaded the book and scanned the table of contents to get an idea of what it contains. I found that many of the post were ones which I had read on his blog some years earlier, when he was actively blogging. At the time I had thought that the posts were really good, and still do. They're probably worth reading - by downloading the book - for anyone who has not read them before, and even for people who have. I'm going to read the book myself in the next few days.

- Vasudev Ram - Dancing Bison Enterprises

Signup to hear about my new products.

Contact Page

Share | var addthis_config = {"data_track_clickback":true}; Vasudev Ram

Categories: FLOSS Project Planets

Anova Precision Cooker Review

Thu, 2015-02-05 12:37

In the latest episode of Bad Voltage, I review the Anova Precision Cooker Sous Vide. While you should listen to the show (which includes discussion of the review), here’s the review text.

Anova Precision Cooker

As I mentioned in my Soylent review, viewing gastronomy as merely about sustenance is anathema to me. To say I enjoy food, food culture and eating is a prodigious understatement. It may come as no surprise then that I also enjoy cooking. While I’ve wanted a sous vide for some time now, there simply hasn’t been an affordable model I liked until a recent round of product launches. The Anova Precision Cooker seemed like a nice confluence of quality, price and technology and was the device that finally convinced me to plunge into the world of sous vide. For those unfamiliar with sous vide, it’s a method of cooking food sealed in an airtight bag in a water bath for longer than normal cooking times at an accurately regulated temperature much lower than normally used for cooking. The intention is to cook the item evenly, ensuring that the inside is properly cooked without overcooking the outside, while retaining moisture.

The Anova Precision Cooker is an immersion circulator sous vide, that has a temperature range of 77-210 degrees Fahrenheit, is accurate to a tenth of a degree and can heat up to a 5 gallon tank for a maximum of 99 hours. The unit is Bluetooth enabled and can be controlled from a smartphone, although at the time of this review neither the iOS or Android official apps have been released.

With the technical specifications out of the way, it’s time to move on to using the device. You may be wondering how easy it is to cook sous vide and more importantly, how does the food actually taste. Operating the Anova is extremely simple. You fill a suitable container with water, plug the device in, scroll the large wheel to your desired temp and hit the start button. Once the water has reached the desired temperature, you place the vacuumed sealed food in and wait. One great thing about sous vide is experimenting with the time and temperature to create an end result that’s ideal for you. Once you have the two variables dialed in to your tastes, you can perfectly replicate the outcome over and over again. To give you an example, a steak cooked for 90 minutes at 136 degrees Fahrenheit results in a Jeremy approved medium rare . As for the taste; well, it’s delicious. But there’s science behind it all. At these lower temperatures, cell walls in the food do not burst. In the case of meat cooking, tough collagen in connective tissue can be hydrolysed into gelatin, without heating the meat’s proteins high enough that they denature to a degree that the texture toughens and moisture is wrung out of the meat. Because of this, it’s not uncommon to cook some cuts, such as pork belly or spare ribs, for 48-72 hours. Additionally, enclosed spices or ingredients added to the sealed bag transmit their flavor more intensely than during normal cooking. The end product truly is amazing. One downside of that process, however, is that the low temperatures used means no Maillard reaction.. and that means no char. That has a negative impact on both texture and taste. Enter the Searzall. Invented at Booker and Dax, the food science lab arm of the Momofuku empire, the Searzall is an attachment secured to the top of a blowtorch to create the perfect searing temperature without the noxious aromas that typically result when cooking with a blowtorch. By forcing the thin flame of the blowtorch through two layers of fine, high-temperature-resistant wire mesh, it produces a consistent, evenly spread flame that provides a professional quality sear. The end result of a piece of steak cooked in the sous vide and then finished with the searzall is one that will rival the finest steak you’ve ever had.

So, what’s the bad voltage verdict? At $179, the Anova Precision Cooker isn’t outrageously priced but do keep in mind you will also need a vacuum sealer, suitable container and optionally a searzall (although a cast iron pan also works quite well). The total all in cost can be significant, especially if you opt for a chamber vacuum. That said, if you consider yourself an epicurean who enjoys cooking and eating, I think you’ll be highly impressed with what this combination puts on your dinner table.

–jeremy


Categories: FLOSS Project Planets

Bad Voltage Season 1 Episode 35: One Plug Per Segment

Thu, 2015-02-05 11:48

Bryan Lunduke, Jono Bacon, Stuart Langridge and myself unleash all the Bad Voltage you can handle, this week featuring:

  • Live Voltage! The first Bad Voltage live show, on 20th February at SCALE. Come to it! Be part of the majesty! (2.13)
  • Jeremy reviews the Anova Sous Vide, and discusses the nature of gastronomy and culinary expertise (10.03)
  • We talk to Ilan Rabinovich about the upcoming SCALE conference in LA and the history of how it came to be (26.47)
  • Bryan is Wrong in 60 Seconds about… Wrong in 60 Seconds (42.04)
  • Mir and Wayland: what’s going on there, now? Now that the controversy has blown over, what’s the score with next-generation display servers? (43.10)

Listen to 1×35: One Plug Per Segment

As mentioned here, Bad Voltage is a project I’m proud to be a part of. From the Bad Voltage site: Every two weeks Bad Voltage delivers an amusing take on technology, Open Source, politics, music, and anything else we think is interesting, as well as interviews and reviews. Do note that Bad Voltage is in no way related to LinuxQuestions.org, and unlike LQ it will be decidedly NSFW. That said, head over to the Bad Voltage website, take a listen and let us know what you think.

–jeremy


Categories: FLOSS Project Planets