Fixed: gResistor not launching on Ubuntu

As many people have stated on the application’s store page, gResistor doesn’t seem to start on Ubuntu.

The Problem

If you run the program from the command line, you’ll notice that there is a missing library.

$ gresistor
<Error output here . . .>

ImportError: No module named glade

The Solution

Install the missing Python 2 library

sudo apt-get install python-gtk2 python-glade2

After installing it, you should be able to launch via the GUI or command line.


Another Cover, Another Controversy

If you’ve been following comic book news lately, you’ll likely have heard about the controversy surrounding a cover for the newest run of Iron Man, starring Riri Williams, an African American teenager, as Ironheart. The cover in question, drawn by J. Scott Campbell, drew criticism for having Riri in revealing clothing, drawn in a stereotypical “black sassy” fashion and for having very light skin among myriad other reasons that people dug up. This is just my two cents on the issue.

First, it was a variant cover. Many of the people upset by this cover have no idea what that means because they don’t read comics. Variants are alternate covers for a particular issue, with the internal pages left untouched. They are almost always rarer than the standard cover for a comic book and usually sell for a higher price at stores. Furthermore, the average comic book reader does not usually buy them and in some cases see them as the store could have them stocked in a separate location. I buy variants if they are done artists that I like, but usually opt for a regular cover because they are cheaper. That said, 80 to 90 percent of the people that had the intention of buying this issue, probably would not have even seen it and if they did, it would have been among many, many other variant covers to be noticed. This cover was for enthusiasts, not the average consumer.

The other issue is that offended parties wanted the cover removed because they don’t want people to see it. Unfortunately making a mountain out of a mole hill like this had the exact opposite effect. This cover probably received 10 times the exposure just because of the controversy. Everyone has seen it now and people want it more than ever because they know it was pulled (including myself!). The value of this issue has probably skyrocketed considered it already was a rare variant that is now in scarcer supply.

All this just to appease people that don’t even read comics. The same thing happened not too long ago with Rafael Albuquerque’s cover of Batgirl #41. Again, we had a variant out commemorating the Joker’s 75th anniversary, which depicted the Joker standing next to a scared Batgirl, an homage to the pivotal graphic novel “Batman: The Killing Joke.” It is by far one of my favorite comics, but incredibly dark. Again people were offended by the cover and I’m willing to bet none of them read The Killing Joke.

The comics industry needs to grow a backbone and respect the opinion of people who actually buy their products, not people looking for any reason to be offended.

A Message to All Internet Users

Recently at work, we launched a new product that allows users to view PDF documents in their browsers without having a dedicated software like Adobe reader installed, using the PDFjs library from Mozilla. Aside from being a convenience for users, the software allowed us to do things like track user activity to see how popular documents were. No doubt, the library is amazing, but it requires some of the latest web technologies, such as web workers, to function. This is trivial in modern browsers like Google Chrome and Firefox. Heck, it even probably works in Opera. But of course with any web development project, the worst part of it all is working with Internet Explorer. Unlike FF and Chrome, which update seamlessly in the background, IE users are stuck with whatever major version they have unless they upgrade it themselves or realize there are better browsers out there.

Here is the issue for me. The web is an amazing place, so different from the screeching dial up modems of the 90’s. There are sites that help you reconnect with old friends, fund raise for a family member’s medical procedure and even watch High Definition videos of cats playing with laser pointers. None of this — including the cats — would be possible if browsers didn’t update and support the latest features. However, IE continues to lag behind it’s more successful rivals. And because of the lack of support for some parts of say, HTML5, developers are forced to waste spend time trying to get their applications to work on these old browsers with esoteric hacks and ugly directives.

If you’re any sane person using the internet, you want the latest features on the websites you visit. As developers we want to give them to you. Really, we do. It’s our job. But you’ve got to help us help you. Stop using outdated browsers like IE9 and IE10. Using something that actually follows standards allows us to spend more of our time making cool apps and less time frustrated over getting basic features and styling to work in Internet Explorer. Heck, use Edge if you want to, just use something that didn’t come out half a decade ago.

This is particularly a problem for large corporations that force their employees to use outdated software in the name of “security.” News flash: The latest version of software is often the most secure because it patches up the holes that exist in the earlier versions. Making employees use IE9 for example isn’t making anyone safer — quite the opposite. You’re putting your business, data and customers at risk by trusting obsolete software. Newer browsers mean faster browsing speeds, more security and the latest features. If you wouldn’t use a typewriter to send correspondence to your customers, why would you use a slow, buggy browser to access your products?

Please. For our mutual benefit, upgrade to a modern browser.

Thank you.

Using jQuery’s jscroll Plugin

Recently I was looking around for a quick way to implement infinite scrolling and found the jscroll plugin for jquery.

The problem was that all the examples online were broken and they all seemed to copy and paste from each other which made it difficult to figure out what worked. Finally I got something working and just wanted to post the options that I was using for anyone else that needs help with it.


The JavaScript

Backend API

Depending on your framework, create an endpoint that returns a response containing your content and a link to the next item to load (a link element) at the end. It is important that this response contains the HTML necessary for the item you are rendering and is not just a JSON response.

Overlay an Image on Top of Another with GraphicsMagick


gm composite -resize 1920x1080 -dissolve 40 overlay_image.jpg base_image.jpg result_image.jpg

Break Down

The resize option resizes the overlay to the specified dimensions. You can specify just the height with x1080 or just the width with 1920. Typically you would want this to be the same width as the base image.

Continue reading

Create thumbnails of PDF’s with Node JS and GraphicsMagick

1. Install GraphicsMagick

On Ubuntu (14.04):

sudo apt-get install graphicsmagick


2. Install the Node library in your project

npm install gm


3. Write  a script

Below I show two ways of creating a thumbnail. The first way creates a JPG using various GraphicsMagick functions, I prefer this way because it gives me fine grained control over the thumbnail. The second uses a built in function for thumbnails, which is easy to use but isn’t as flexible.
Continue reading

How to Add a library file to EESchema

Recently I wanted to add an Arduino library to EESchema to make a schematic. Here’s how to do it.

Download the Library Files

First download the library from somewhere. I found the library I wanted on GitHub, but there are other places you can look, too.

Add the Library Files

Whether you downloaded a singled zip or multiple files, make sure you’ve located the .lib file. That’s what you’ll be adding. Open EESchema and open the Preferences > Library Menu. It should look like the window below.

from -home-jamil-Documents-KiCad-Arduino Schematics-RGB-RGB.pro_006

To the right of the Component library files pane, click Add. Locate your library file and add it. Click OK.

Now when you go to place a component, List All to see all your libraries and you should see your new library in the listing. Click on the library to choose your component and put it on your sheet.

Stop Accidentally deleting apps from your iPhone

If you’re like me, you don’t install many apps and you delete them even more rarely. But sometimes, like me, you might absent-mindedly hold your phone in your hand or pocket while it is on and your palm starts doing all sorts of crazy things.

Once I was talking to someone and briefly looked at my phone to see a confirmation asking me if I was sure I wanted to delete my mail app (one of my most frequently used apps on my phone)!

However, you can turn off the ability to delete apps with restrictions on your phone. Go to Settings > General > Restrictions > Deleting Apps and turn that off. If you’ve never used restrictions before, you’ll be asked to set up a new pin. This is a different pin from your lock code, so don’t get them confused.

2016-03-20 19.27.57 2016-03-20 19.28.18

Now when you leave this menu you will not be able to delete apps at all. If you want to delete an app, come back into this menu and turn this setting back on.

There are a lot of other useful things you can do in restrictions like restrict content on the web or location services, yadda, yadda, yadda. Useful if you have young’uns that have their own phones. If that’s the case, your poor parenting might be the subject of a future post.


Permission Denied when uploading a program to my Arduino

If you just started playing with Arduino on Linux, you may have run into an error uploading your very first program, similar to the following:

avrdude: ser_open(): can't open device "/dev/ttyACM0": Permission denied
ioctl("TIOCMGET"): Inappropriate ioctl for device
Problem uploading to board. See for suggestions.

Your Arduino is mapped to a character device file called /dev/ttyACM0 and it looks like the IDE does not have permission to write to it. That’s essentially the problem and the fix is simple enough.

Open up a terminal and follow these commands. First let’s figure out what the current permissions are on this file.

ls -lah /dev/ttyACM0

You should get output similar to the following:

crw-rw---- 1 root dialout 166, 0 Feb 28 10:47 /dev/ttyACM0

What this shows us is that the owner (root) has read and write permissions, the group (dialout) has read and write permissions and others have no permissions at all. The fix is to let others have read and write permission so that your IDE can upload the program.

sudo chmod 666 /dev/ttyACM0

As demonic as that permission code looks like, it is actually just giving everyone read and write permission for this file.

If you run the ls command again, you should see that the permissions have changed:

crw-rw-rw- 1 root dialout 166, 0 Feb 28 10:56 /dev/ttyACM0

I don’t know what the user is when the IDE tries to upload, but if you do, please leave a comment!

You should now be good to upload your sketch to your Arduino.