APOD Wallpaper: Fascinating!

April 5th, 2012 by ellery

If Mr. Spock had a big flat panel screen instead of being forced to look into a slot in a cereal box, he would have used APOD Wallpaper for his desktop background.  The Astronomy Picture of the Day website features a daily different collection of photons collected from the far reaches of the universe.  The awe-inspiring images from the depths of space are occasionally interspersed with space-related pictures of objects closer to home.  And each one comes with an explanation that adds to the wonderment.

You could visit the APOD website each day.  Or better,  Windows users can run the APOD Wallpaper app and receive a different breathtaking image on your desktop background each morning.  The app puts a little icon of the planet Jupiter in your Systray.  Right mousing on Jupiter pops up a menu that will bring up the APOD Wallpaper settings, show you the astronomer’s explanation of the day’s image, or take you to the APOD website.

The app is easy to install.  It comes in a Zip file.  Just unzip it into a convenient location (such as c:\Program Files\APOD), and run it.  In the Settings you can tell it to automatically run when Windows starts.  There are a couple of other Windows apps that do nearly the same thing.  Linux and Mac users have several choices, too.

Simple Popup Requester in Python

March 14th, 2012 by ellery

Sometimes I think I should change the name of this blog to Mind Like a Sieve, subtitle Straining to Remember.

I’ve built some miscellaneous one-off GUIs with various Python toolkits like Tkinter and wxPython, but this time I wanted just a simple confirmation popup.  In this case it was to pause so I could attach a debugger.

The comment on this page of the tkinterbook had exactly what I needed.  Also, there is a page showing examples of all the different simple popups you can make using this approach.  One benefit of using this approach is that Tkinter is bundled with Python, so there are no additional packages to install.

Here’s the simplest code snippet:

import Tkinter, tkMessageBox
Tkinter.Tk().withdraw() # suppress blank Tk root window in Windows
  ...
tkMessageBox.showinfo("Debugging", "Attach debugger, then click OK")

You can, of course, get much fancier with some of the popup versions, and you can capture the return value from the user interaction.

RJ45 Network Cable Connector Wire Order

February 13th, 2012 by ellery

I’ve spent so much time reciting this sequence to myself while putting connectors onto network cables that I will probably never forget it.

But just in case: the order of the color-coded conductors (from left to right when inserted up into the RJ45 connector with the contacts facing you) is:

  • Orange Stripe
  • Orange
  • Green Stripe
  • Blue
  • Blue Stripe
  • Green
  • Brown Stripe
  • Brown

…and crimp!

 Tips:  Remember to push the wires all the way up into the connector so the wires go under the contacts.  Then, push the cable’s outer insulation up into the connector, too, so that the connector’s plastic wedge will grab and hold the insulation when crimped.

csh vs. sh

February 9th, 2012 by ellery

Sadly, this describes me: CSH Programming Considered Harmful

I’ll try to be better.

I found the article referenced above while trying to solve something that was turning out convoluted in my csh script (redirect just stderr to /dev/null). It was trivial in sh.

It is a definite trade-off, though, when it’s something you don’t use daily, where maintainability is a concern, and where you work with people who pull their hair out even at the csh syntax.

Restore Thunderbird’s missing folder pane

January 27th, 2012 by ellery

Here’s what to do if your Folder Pane disappears. The Folder Pane is the left one that shows the tree of mail folders: Inbox, Sent, Drafts, etc. If there is no space there (the other panes extend to the left side of the window) it is probably just not displayed, and you can drag its resize bar from the left, or display it with the View menu.

But if the Folder Pane just comes up as a blank space, it could be due to a previous crash of Thunderbird, or corruption of some auxiliary files that need to be rebuilt. Here’s how to fix it:

  • Exit Thunderbird
  • Find your profile folder.  In Windows, you can navigate directly to your profile folder at the following path:
       C:\Users\<user>\AppData\Roaming\Thunderbird\Profiles\<profile>\
  • In Linux, look for it here:
       ~/.thunderbird/<profile>/
  • or here:
       ~/.mozilla_thunderbird/<profile>/
  • The AppData folder might be hidden: to show hidden folders, open a Windows Explorer window and choose
    “Organize → Folder and Search Options → Folder Options → View (tab) → Show hidden files and folders”
  • You can (should) make a backup copy of your profile folder now, in case something goes wrong
  • In the profile folder, rename the session.json and foldertree.json
    files (to session.json.bad and foldertree.json.bad)
  • Restart Thunderbird

If something goes wrong, you can restore your old session.json and foldertree.json files, then go searching for a different solution.

Convert 3ds files to obj with Blender

January 24th, 2012 by ellery

Blender

3DS is an aging binary interchange format for 3D models. OBJ is another aging, but ASCII-based format for 3D models.

Here is a simple Python script that converts one or more files from 3DS format to OBJ format using Blender:

# Convert 3ds to obj using Blender
#
# Run as follows:
#   blender -b dummy.blend -P bl_3ds2obj.py -- file.3ds ...
#
# dummy.blend is just an empty Blender file needed as an argument.
# Put one or more .3ds files on the end of the command.
# The .obj files will be created with the same name (and path) as
# the .3ds file, but with the .obj extension.
# The export creates a .mtl file for each .obj file also.

import bpy
import sys
import os.path

for i in range(1, len(sys.argv)):
    if sys.argv[i] == "--":
        break

for file in sys.argv[i+1:]:
    # Start with an empty scene
    bpy.ops.object.select_all(action="SELECT")
    bpy.ops.object.delete()

    # Read a .3ds file
    bpy.ops.import_scene.autodesk_3ds(filepath=file)

    # Write a .obj file
    outfile = os.path.splitext(file)[0]+".obj"
    bpy.ops.export_scene.obj(filepath=outfile)

 

Save the script code in a file named blender_3ds2obj.py.  You will also need a Blender file to use as a placeholder in the command line.  You can save an empty file from Blender, or use an existing one.  Assume it is called dummy.blend.

To convert 3DS files, use the following command:


blender -b dummy.blend -P bl_3ds2obj.py -- file1.3ds file2.3ds file3.3ds

Tack on as many 3DS files to the end of the command as you want.

Note:  This assumes that dummy.blend and bl_3ds2obj.py are in the same folder as your 3DS files.  If not, you will need to specify the proper path to each.

List: My Favorite Firefox Add-ons

December 6th, 2011 by ellery

Firefox has lots of add-ons that make web browsing more pleasurable. There are many I have not explored, but these are my current favorites:

Tree Style Tab
Lets me have the tabs down the left side in a collapsable tree view. Saves screen real estate and makes more tabs readily accessible.
FireGestures
I find myself trying to use the same mouse gestures in other tools. I wish I could get this as a desktop add-on.
AdBlockPlus
Hides ads: rose-colored glasses for web browsing!
Firemacs
Old habits die hard: muscle memory lasting longer than other types.
DownThemAll!
Nice if you are trying to grab several large files at once.
FireBug
Great for figuring out why web pages don’t work.
Locationbar2
Adds some capability to the address field.
Searchbar Autosizer
Makes the search field big when you use it.
Xmarks
Keeps bookmarks synced between machines. I appreciate it when I move into a new computer.
KeeFox
Integrates the KeePass password manager with Firefox. Now I feel at least a little bit more secure.
Disconnect
Makes me feel like I’m not being tracked quite so much, but it breaks some Google things, so I have to turn off the Google blocking for Google Maps or logging in to a Google account.
Linkification
Currently disabled. Hasn’t kept up with the Firefox release cycle.

You can get add-ons for Firefox by typing about:addons in your Firefox browser’s address field.

McDonald’s 2011 Monopoly Rare Game Pieces

September 29th, 2011 by ellery

The official game rules are here.

I’m listing the hard-to-get pieces here, so I can check easily with my greasy fry hands.

Disclaimer:  This is based on my personal interpretation of the rules.  It could be wrong.  I cannot be held responsible for any bad decisions you make based on this information.

  • Mediterranean
  • Vermont
  • Virginia
  • Tennessee
  • Kentucky
  • Short Line Railroad
  • Ventnor
  • Pennsylvania
  • Boardwalk

Thunderbird Message Reading Order

July 27th, 2011 by ellery

I finally went looking for one of my pet peeves with the Thunderbird email tool, and the Internet did not disappoint.

I like seeing my message list with the newest items at the top of the list, yet I normally read them oldest to newest.  When I finish reading a message and delete it, Thunderbird’s default behavior is to select and display the message below the previous selection in the list.  My newest-at-the-top sort order causes the next older message to be displayed, which is probably the one I looked at just prior to the one I deleted.  I want it to select the next newer message.

Turns out there is an option for this in Thunderbird’s config options.

Go to Tools->Options…, Advanced tab, Config Editor….
Change the option mail.delete_matches_sort_order to true.

Now if only someone would add the Reply/Reply All toggle that I’ve been pining for….

Win 7 Explorer Folder Display Bug

June 9th, 2011 by ellery

I am eagerly awaiting a fix for the Windows 7 bug that causes the Windows Explorer tree view to jump after you expand a node in the tree. Very irritating. The bug has been there since the first release of Win 7.

I had hoped the fix would be in SP1, but no. Let’s annoy Microsoft right back by voting to get this bug fixed.

 

Update:

I am cautiously optimistic that the workaround from Michael Noxfeld on 1-18-2012 may actually have fixed this problem!  It could just reappear on the next reboot, but I can always hope…

Click on the link to go to the bug page, then click on the Workarounds tab and scroll down a ways to find it.

Update:

Nope. That improved one aspect of the subtree display behavior but not the delayed jump back to a previous location. Still searching for a full solution.

Update 2:

I now believe the delayed jump was caused by the Network section of the tree view being refreshed. It takes a few seconds for all the machines on our network to be polled and added to the list. If I can launch Explorer with the Network subtree closed, this does not occur. So now I am religious about collapsing the Network section, so that when I launch a new Explorer window it won’t feel the need to refresh and cause the tree view to scroll at an unexpected time.