666: Because the pen is mightier than the sword
New life for old toys
I’ve accumulated a number of old PCs, laptops, and even a couple of servers over the years. With the recent chip shortages and supply chain problems I’ve taken to finding new applications for them. Compatibility is surprisingly good. The x86-64 platform has been around for a long time. One problem I’ve hit recently is that […]
Install Flirc software on Fedora (and other RPM based distros?)
The Flirc Media Center Companion is a neat little USB device that lets you use any IR remote control with your Raspberry Pi or Android stick. The software you need to set it up is available for Linux but they only maintain the Debian package. There’s an old RPM available but I had problems installing it. […]
Lazy Admin’s Guide To Changing Mongo Oplog Size
Have you read Mongo’s official guide to changing the size of your oplog http://docs.mongodb.org/manual/tutorial/change-oplog-size/ and found it a bit intimidating? Are you resizing it because you already have replication problems anyway? Might as well rebuild your secondary and increase the oplog size in one shot. It’s basically the same as the procedure outlined here: http://docs.mongodb.org/manual/tutorial/resync-replica-set-member/#automatically-sync-a-member. […]
More consistent iteration times
We were doing some quick and dirty load testing the other day, using a simple shell script to load messages into a queue in batches. The code looked something like: while something ;do echo Sending messages $(date) send-messages some-other-stuff sleep 5 done It seemed to be working but every few iterations, the time would skip […]
WebSphere Jython scripting, add the script directory to the import path
If you’re running a script with wsadmin and it tries to import other modules that live in the same directory, you’ll discover another difference between Python and wsadmin. Python will always look for modules in the path that the script was run from. wsadmin won’t. This is kind of annoying if you have a few […]
Running the latest Bing on “not supported” devices
Workaround for the “Your device has been identified as not supported.” error in the new Bing
WebSphere Jython scripting, sys.argv and __file__
Today’s problem is that wsadmin sets up sys.argv differently from normal Python (or Jython). In Python, sys.argv is the name of the script you invoked. What you’d normally think of as the command line arguments start at index 1. For whatever reason, wsadmin doesn’t pass the script name. The arguments are passed in starting at […]
WebSphere Jython scripting, __name__ == ‘__main__’
Fix __name__ in wsadmin so it returns ‘__main__’ when it’s supposed to.
WebSphere Jython scripting: bool, True and False
A bool type and True/False constants for Jython 2.1.
WebSphere Jython scripting, importing the Admin objects
Now you can import AdminApp, AdminConfig, AdminControl, and AdminTask anywhere.
Got any book recommendations?