Pages

Sunday, August 5, 2012

Users of Powder Blast Beware

I've been a fan of Break-Free Powder Blast as a quick and easy way of cleaning firearms, and have been using it for a long time with no issues. After having neglected to clean my pistols the last few outings, I decided to give them a more-generous-than-usual application of my cleaner of choice. It seems some plastics and rubbers can be melted by the stuff. Fortunately, only minor cosmetic damage was done to my beloved CZ 75 (actually a CZ 85B). So if you're a user of Powder Blast (or similar solvents), you may want to make sure it's safe (or just always take those parts off) first. Also be careful about using it on magazines, I read someone on THR had melted it so bad it seized up.

Saturday, June 2, 2012

Ubuntu 12.04 & Eclipse

I use Ubuntu at work for development, mostly with Jetbrains IntelliJ IDEA these days, I was surprised when I tried to fire up Eclipse for the first time in a while that I couldn't do so.  The error I was getting was
An error has occurred. See the log file /home/wittk/.eclipse/org.eclipse.platform_3.7.0_155965261/configuration/1338578313816.log
Here's an excerpt from the log mentioned in the message:
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: 
 no swt-gtk-3740 in java.library.path
 no swt-gtk in java.library.path
 Can't load library: /home/wittk/.swt/lib/linux/x86/libswt-gtk-3740.so
 Can't load library: /home/wittk/.swt/lib/linux/x86/libswt-gtk.so

The solution is to link the swt library files to the location it is looking.  This solution was mentioned here.  Just run the commands below.
cd ~/.swt/lib/linux/x86*
for file in /usr/lib/jni/libswt-*3740.so; do ln -s ${file}; done

Tuesday, May 15, 2012

A Mercurial Userscript

I've got a minor complaint against the Mercurial web interface, and that is that when you are browsing around using the tip version, links will point to the nodeid tip points to rather than keeping the URLs with the relative tip version.  I think the way it should work is that you stay on the tip, unless you are click into a revision log (so that you can click specific revisions).  This is especially nice for sharing a link to the latest with someone, you would want to keep that link relative.
For the most part, I don't really care what Mercurial does, but since I do use their web interface because it's the SCM of choice for the OpenJDK project, I thought I'd whip up a userscript to remedy the situation.  Check out the script here, then test its effects by browsing the latest JDK sources:
http://hg.openjdk.java.net/jdk6/jdk6-gate/jdk/file/tip/src/share/classes/
http://hg.openjdk.java.net/jdk7/jdk7-gate/jdk/file/tip/src/share/classes/

Let me know if you have any problems or suggestions for improvement.

Tuesday, March 6, 2012

The Chrome bug that's not a bug

As some others have explained, apparently the new tab button missing the + in Google Chrome isn't a bug.  I thought it was a bug, other Chrome users (non-geeks) in my family thought it was a bug.  But Google says "User experience research on our end seems to have confirmed that this change does not decrease usability and in fact can lead to an overall improvement in people's perceptions of the UI (some participants described the change as "cleaner" or "neater")." I think this is crazy. I suggest you star the issue, maybe they'll come to their senses.

Wednesday, December 28, 2011

Running Lego Mindstorms RIS 2.0 on newer windows

While getting my old Lego Mindstorms (an RCX 2.0 setup) set up for my little brother to play with, I learned some thigns about using it with newer versions of Windows (Windows 7 in my case). I found out here that there is a patch needed for the USB IR tower, which resolves the problem of the system locking up when the tower is plugged in. You can download it here: http://cache.lego.com/downloads/education/tower164.zip.
After installing this, things will run fine, unless you decide to use the official program and launch it more than once. At which point you will see a message like "A critical error has occurred. You may be running out of memory, or you may need to reinstall Robotics Invention System 2.0." The solution to this is a bit messy. There is a file left behind here
Vista/Win7: C:\Users\<user>\AppData\Local\Temp\Ris 2.0.mov.#res
XP: C:\Documents and Settings\<user>\Application Data\Temp\Ris 2.0.mov.#res
This file must be deleted each time before the program is launched. What I did was create a batch script to do this, and a Visual Basic script to launch the batch script (so it could happen without launching a command prompt window).
You'll find both scripts here: https://gist.github.com/1531705
I recommend replacing all shortcuts to theLaunchRis2.exe with a shortcut to the Visual Basic script. Note that the VB script assumes you will put put the batch script in %PROGRAMFILES(X86)%\LEGO MINDSTORMS\launchRis.bat (or %PROGRAMFILES%\LEGO MINDSTORMS\launchRis.bat on a 32 bit system), but you can easily edit the script to change the location.
Of course, this second problem is irrelevant if you decide to write the programs youself (I preferred this over the graphical tool Lego provided). There are several languages available.
Let me know if you have suggestions for improvement or run into any issues.

Thursday, September 1, 2011

A userscript for Viewvc

I've posted a userscript I've written as a workaround for a request for ViewVC that hasn't been done yet (despite the fact a patch has already been submitted).  The missing feature is a link to the log view for directories.

A few Autohotkey scripts

I decided to post the source for a few Autohotkey scripts a couple of days ago:

  • GW Tonic Bot : This one is a bot to drink tonics for you in Guild Wars to help you get your Party Animal title. It maps back and forth between your Guild Hall and drinks 2 tonics (yes, 2 tonics because of a bug in GW) each time it stops.
  • GW Drunkard Bot : This one was meant to drink alcohol at specific intervals to achieve optimal points towards your Drunkard title.  This was made obsolete by the March 3, 2011 update.  You can now click them (or have an autoclicker click them) as fast as you want.
  • Generic Autoclicker : This one can be for any kind of automated clicking, it just clicks (or double clicks) where you tell it to at an interval you specify.
Note that I haven't tested them in IronAHK, only Autohotkey on Windows.  Also note that it's also easy to convert these to an .exe file if you don't want to install Autohotkey.  And if a non-techie is reading this, I'm happy to provide that for you.  Just leave a comment below.

Also feel free to comment (or fork) either of these scripts if you have improvements.  Some people have found that the delay between mappings in the tonic bot is not long enough for slower internet connections and so you have to tell it to drink more tonics than you'd think (since some clicks will be wasted).