Sunday, February 10, 2019

We're not in Kansas

I've been using the excellent MaxMind Geo IP database ( in a Python application ( Interestingly, when I look a MSU Denver's IP address:
$ python3
Python 3.7.1 (default, Nov 18 2018, 09:59:08)
[Clang 10.0.0 (clang-1000.11.45.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import geoip2.database
>>> reader = geoip2.database.Reader('/usr/local/lib/python3.7/site-packages/_maxminddb_geolite2/GeoLite2-City.mmdb')
geoip2.records.Location(average_income=None, metro_code=None, time_zone=None, population_density=None, longitude=-97.822, postal_code=None, postal_confidence=None, accuracy_radius=5, latitude=37.751)

the lat/long says we're in Kansas, in the middle of a reservior acutally:
 Who knew?

Thursday, January 11, 2018

Nikon View NX and sleepy OS X

For some unknown reason, View NX from Nikon craps out when OS X goes to screen saver. Here is what I had to change the power settings to in order to export ~500 photos without being present during:
I suppose I could spend the time to figure out which setting matters and/or dtrace the process, but really Nikon: is this my resposibility? Your software matters almost as much as your hardware.

Sunday, November 12, 2017

Tuesday, October 10, 2017

Install jar in local Maven directory

I'm not sure why I couldn't find an easy reference on what to change in a pom.xml file to install a jar in the local Maven repository. Lots of complicated command lines (a few of which actually worked) and little else. I'm not sure why everyone feels the need to make things more complicated than they are. Regardless, here's what worked for me.
A mvn install:install-file then does the trick.

Wednesday, October 4, 2017

Out with the GNU...

I became fed up with the Gnome-3 window system. Hard to configure and use for me. So, out with the GNU:
apt-get purge gnome*
and in with the Cinammon:
apt-get install cinnamon-desktop-environment
Much better.

Sunday, May 7, 2017

jdeps on rt

Out of curiosity, I wanted to know how the classes in Java's runtime were related to each other. Happily, Java ships with a dependency too, jdeps. So, on my Mac, I ran
jdeps -dotoutput dot -verbose:class /Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/rt.jar
There are 20683 classes and 227874 links between them. I had a difficult time getting a graph built. GraphViz wasn't having it. I turned to GePhi and it's OpenOrd algorithm and that worked. Here's the image.
Almost art. Lots of interconnections.

Thursday, November 24, 2016

Trigger on Marksman 1790 "Biathlon" air rifle

I've had one of these lying around for years. Picked it back up recently and the trigger was horrible, almost unusable. So I took it apart of course. There's a single pin that holds the two halves together and drifts out with a 3/16" punch:

This also allows the action to be removed from the stock. Here's a picture of the "roller" sear with an arrow showing the point of contact:

Note the main spring is removed here to show what it would look like cocked. Also, I recommend disassembling with the right side down, opposite of how it is shown here. That requires removing the four screws and then flipping the action over before removing the left side up and off.
My roller was no longer rolling at all; some WD-40 solved that problem. I also cleaned up the face of the lower silver part with 220 and 500 grit sandpaper. It appeared the face had been dinged by the roller not rolling. Here's a shot with the trigger spring in its proper place, mine went flying upon disassembly and it took some time to figure out how it goes back. I recommend reassembly on the right side, again opposite of what is shown here, as it makes things a little easier.

I emailed info at marksman dot com to no avail to ask about this, so I hope this proves useful to someone out there. The trigger is so much better now.