UPDATE 2014-10-17 – Installation of the “Insensitive Message Tray” extension has solved my issue with the notification bar frequently appearing when I did not want it to. This is on Gnome version 3.10.2. Note that pressing the Super+M keyboard shortcut will allow you to view the message tray when you want to.
My old work laptop, the ThinkPad T510, went out of warranty a few months ago. At work this means I’m eligible for a hardware refresh, i.e., a new laptop. Because they’re so much thinner and lighter, this time I decided to go with the 400 series. All in all it’s a fine piece of hardware, so long as you’re running Fedora 20 (or newer). I have two lingering issues however.
The T440s is one of those laptops trying it’s hardest to emulate the Apple Trackpad. That is to say, the T440S has one giant touchpad, no left/right/middle buttons. Unfortunately for Linux users, this is usually either a hit or a miss. It was a miss for me.
My problems with laptop touchpads usually come down to a few basic things:
And specific to the T440s:
In the past I’ve dealt with the former issues by simply disabling tap to click and touchpad scroll regions. But the T440s is an entirely different beast which required quite a bit more effort to make it usable.
I’ve written a new Python module which I’m calling bitmath.
Given my day job as a System Administrator, and the content of my upcoming book on Linux virtual disks, I frequently find myself in situations requiring me to convert file sizes into various other formats. I recall far too many instances of having to do unit conversions mid-code in projects (does this look familiar to anyone else?):
Thus, out of necessity, bitmath was born.
I’m going to plagiarize myself here and rip the long description right from the project:
bitmath simplifies many facets of interacting with file sizes in various units. Examples include: converting between SI and NIST prefix units (GiB to kB), converting between units of the same type (SI to SI, or NIST to NIST), basic arithmetic operations (subtracting 42KiB from 50GiB), and rich comparison operations (1024 Bytes == 1KiB).
In addition to the conversion and math operations, bitmath provides human readable representations of values which are suitable for use in interactive shells as well as larger scripts and applications.
Anyone not deeply invested in the heartache that comes with converting base-2 and base-10 prefix units can stop reading now.
bitmath finally provides a uniform way to manipulate these units in a way which is natural to Python programmers. There’s nothing special or unusual required to work with bitmath objects. You can add them, subtract them, multiply and divide them — just like you’re already used to with the int and float objects. bitmath objects support all of the standard Rich Comparison Operators as well!
Converting bitmath objects is a first-class supported operation. Even more complex conversions, like converting from Mibibits to Kilobytes, is trivial. This functionality is supported in both directions: from the lowliest Bit() object through the grand EiB() object. That is to say, any bitmath object, whether it be base-2 (NIST ‘kibi’ and ‘gibi’ style) or base-10 (SI ‘kilo’ and ‘giga’ style), supports conversion (without loss of accuracy) to any other valid prefix unit.
As the previous two examples demonstrated, bitmath objects have useful console representations, as well as string representations. In a future release the format string for this may be configurable.
Fedora/RHEL6 users will need to wait a bit longer for a proper yum install command to be available, as the package
is currently sitting in the package-review queue awaiting judgement. Update: 2014-03-27: python-bitmath is now in Fedora!
However, there are several other methods available for installation: installing from PyPi, building your own RPM, and from setup/distutils.
[..] this post describes our journey from initially trying to implement a simple solution to improve the day-to-day lives of developers, through the technical limitations we experienced along the way, and finally arrives at the empathy for our developers we’ve gained from that experience. We’ll wrap up with a note on how Red Hat Software Collections (announced as GA in September) would’ve simplified our development process.
I recently read the Creative Commons announcement, CC’s Next Generation Licenses — Welcome Version 4.0!. This made me think more about licensing in general, as it has been a topic receiving increased attention recently in Open Source/Tech communities. I think it’s a very important subject that anyone involved in Open Source should have at least some knowledge about.
Incorrectly or unlicensed software (or any other digital resource for that matter) can become a serious barrier to people attempting to reuse published works. I received my first exposure to the this when I was contributing to the Ubuntu project.
I was thrilled when GitHub made it a priority to encourage and facilitate hosted projects having conspicuous and unambiguous licensing. They even made a site, choosealicense.com, to guide users through the process.
You can imagine I was quite surprised when I realized I never put a proper copyright/usage notice on the blog. That said, as of now this blog is officially licensed under the terms of the Creative Commons BY-SA 4.0 license. That means:
You are free to:
Under the following terms:
No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.
“4.0 It’s here.” image was created by the Creative Commons organization and is used under the terms of the CC BY 3.0 license,
You’re on Mac OS X (somewhere around 10.7.5) and you’re using the sed command to replace characters from the latin1 or Windows-1252 character encoding with their utf8 equivalents. Unfortunately you get an error like the following:
sed: 1: "s/#/’/g ": RE error: illegal byte sequence
Luckily you’re not alone!
This happened to me while working on HamDecks, a small project that creates Mnemosyne decks to help you study for the Amateur Radio Operator exams using questions from the official ARRL Question pools. The source question pool files (Technician, General, Extra) though have some problems… There’s a lot of characters with strange/exotic encoding in the ARRL pool files that could not be imported into Mnemosyne. That’s how I got myself into this whole mess in the first place.
The stackoverflow link above makes two suggestions:
Your Mileage May Vary, but neither of those suggestions worked for me. So what did work then?
Once again, we will visit our system locale settings.
Here’s what worked for the HamDecks project:
Instead of just prefixing the sed command with LANG=C, we prefix it with LANG=C LANG_ALL=C. I’m not saying this is a silver bullet, just that it worked for me and might work for you too.