A little corner of the Empire on the web.

Showing posts with label tech. Show all posts
Showing posts with label tech. Show all posts

15 July, 2013

Kindle Weather Display pt4 Putting it all together

By this point, if you've followed the previous posts in this series, you should have a server that's downloading weather info from a weather service, and converting that into a Kindle friendly PNG image, and you should have a Kindle that's been jailbroken, has working USB Networking (and SSH access) and has the Kite application launcher installed on it. Congrats, now let's put it all together and finish this crazy thing off.

Setting up the Weather Display on the Kindle


Find the "kindle" folder in the master.zip file you downloaded previously, or get the files from the "kindle" folder on GitHub.

Copy the "init-weather.sh" file into the "kite" folder on the Kindle. Then create a new folder called "weather" and copy both "display-weather.sh" and "weather-image-error.png" into it.

Open up the "weather\display-weather.sh" in a text editor (the same one that understands Unix line endings from above) and change the line that contains "http://server/path/to/weather-script-output.png" to the web server and file location that you set your weather script up on. When you save the file, make sure that you select Unix style line endings (this will probably be an option on the Save As dialog). Safely Remove and unplug your Kindle.

Now you're ready to test everything, you should see a new "PDF book" on your Kindle's screen called "init-weather.sh" if you don't, then switch your Kindle off and back on again. Select that and your screen should flash a few times and then either show your current weather, or show a warning sign and "Weather Image Unavailable".

Either of those mean that everything's working on your Kindle and you've succesfully run a custom script on it, if you get the image unavailable message then check the web address you've put in for the picture is correct.

One other possibility here is that when you click the init-weather.sh your Kindle puts a loading circle in the top-left corner for a moment, and then flashes back to the Home screen, this probably means that either init-weather or display-weather have been saved with Windows line endings (some decompression/un-zipper apps "helpfully" translate the line-endings for you when you extract text files, yours may have done this) just open the files up in a text editor and make sure that they're saved with the Unix line endings option select and try again.

One thing you'll notice when you've successfully got the weather scipt running is that there's only one way to exit it, and that's to hold down the power button on your Kindle for 20 seconds or so and wait for it to reboot. While that's fine when everything's up and running it can get a bit annoying while you're just testing things (like getting connected to your web server, or playing around with the look of the weather page), one alternative is to drop a test-weather.sh file into the "kite" folder containing:

#!/bin/sh
/mnt/us/weather/display-weather.sh

This should show the weather display on the screen for a moment, and then dump you back to the Kindle's home screen.

Set up Cron On the Kindle

This is it, we're nearly there now, just need to set the Kindle up to regularly check back with the server for an updated weather picture. Cron is how we do that.

Firstly, if you've never used Cron before, read up on Cron at wikipedia and follow links to further info if needed. I can also recommend searching for something like "crontab calculator" or "crontab generator" and using one of those to help build up your cron line, or running a search for "cron" on SuperUser.com.

Now you need to SSH into the Kindle again, you know the drill by now, switch on USB networking on the Kindle, plug it in and reconnect to it with Putty.

Once you're SSH'd into your Kindle, mount the file system for editing:
mntroot rw
Edit the CRON file in vi (a command line, text mode, text editor) (unbelievably *nix people like this thing and even fight religious wars over how much better it is than other text mode editors, like it's still 1980)(Wikipedia - Vi).
vi /etc/crontab/root
A list of the jobs in the root cron file should appear:
*/15 * * * * /usr/sbin/checkpmond
*/15 * * * * /usr/sbin/tinyrot
*/60 * * * * /usr/sbin/loginfo tmpfs
*/60 * * * * /usr/sbin/loginfo localVars
*/60 * * * * /usr/sbin/loginfo memusedump
*/15 * * * * /usr/sbin/loginfo powerdcheck
All we need to do now is add the display-weather.sh script onto the end, mine's set to run every 6 hours, starting at just after midnight.
Try 10 */6 * * * /mnt/us/weather/display-weather.sh



Move the cursor to the end of the final line (using the arrow keys), press "i" to switch into "insert" mode, press Enter for a new line, and then type in your cron line, (if you make a mistake, press Escape to exit editing mode, move the cursor over the text to delete using tyhe arrow keys, and then press "x") press Escape to leave Insert mode, and then press ":w" to save the file, and then ":q!" to exit vi. There, wasn't that straightforward and obvious! For more help with vi commands and a tutorial, consult your favourite search engine.

Your crontab file should now look something like:
*/15 * * * * /usr/sbin/checkpmond
*/15 * * * * /usr/sbin/tinyrot
*/60 * * * * /usr/sbin/loginfo tmpfs
*/60 * * * * /usr/sbin/loginfo localVars
*/60 * * * * /usr/sbin/loginfo memusedump
*/15 * * * * /usr/sbin/loginfo powerdcheck
10 */6 * * * /mnt/us/weather/display-weather.sh

And then you restart Cron, to read the new job details, by entering:

/etc/init.d/cron restart

Which should give an output like:
[root@kindle root]# /etc/init.d/cron restart
system: I cron:def:stopping crond
system: I cron:def:starting crond
[root@kindle root]#

Note: while you can set the Cron repeat interval to very small amounts of time when testing, I really wouldn't advise setting it to repeat any more often than every 5 minutes, as to get in there and change Cron's settings you need to wait for the Kindle to come on, turn on debug mode, turn on USB networking mode, SSH in and adjust the timings, all before the weather job kicks in again. That's not a quick process, you'll want to give yourself a few minutes.

Unplug, switch USB Networking off again, run init-weather.sh and enjoy your weather display.

And we're there!

The finished job, a Kindle showing today's weather
Some atypical English weather, showing on my Kindle.

Useful references and acknowledgements:

Thanks to Matthew Petroff for the inspiration and for putting in all the hard work to get all of the original scripts together and get this working on a Kindle in the first place.

Todo

Thoughts for future changes to this:
  • Wind - being a sailor, the wind conditions can be a useful thing to know, a couple of the weather feeds include this, either by default or as an option, so it should be possible to include it with some tweaks to the vbscripts, a tweak of the SVG template, and some new icons.
  • New icons - while the icons included in Matthew Petroff's original collection are clean and clear, I'm quite fond of the old BBC weather icons - they're what I grew up with - a member of the design team for the BBC's new visual style has made a set of icons in the style of the old classics, available here, it shouldn't be much work to swap these in.
  • Two other personal projects that I'm planning to do at some point are learn PowerShell and rebuild my 2003R2 based home server into Server 2012 whilst recreating most of WHS's functionality, as part of this I may rewrite the server-side VBscripts as PowerShell scripts.

Update 07/2016: download links updated now that project files have been moved to GitHub

  1. Introduction
  2. Setting up the server
    • Weather Services
    • Getting the Image Tools
    • Scheduled Tasks
    • Download the Scripts
  3. Setting up the Kindle
    • Jailbreak your Kindle
    • Setting up USB Networking (1)
    • Setting up USB Networking (2)
    • Installing Kite on the Kindle
  4. Putting it all together
    • Setting up the Weather Display on the Kindle
    • Setting up Cron on the Kindle
    • Useful References and acknowledgments
    • Todo

12 June, 2013

Kindle Weather pt3 Setting up the Kindle

Back to the first post in this series.

Setting the Kindle Up


I'm doing this with a black Kindle 4 (non-touch) running Kindle v4.1.0, some of the following steps could change if you have a slightly different model (grey Kindle 4's may have older older firmware which give you more jailbreak options, they may also have the built-in SSH server enabled), I believe that most of this should work on a Kindle 3 (aka Kindle Keyboard) but I haven't tried that, so do it at your own risk.

Jailbreak your Kindle

I used the Universal method from here: MobileRead.com Kindle4NT Hacking.

Get SSH access to your Kindle (USB Networking) - attempt number 1


Plug in the Kindle and create a blank file named ENABLE_DIAGS in the Kindle's USB drive's root, "Safely Remove" the USB cable and restart the Kindle (Menu -> Settings -> Menu -> Restart).

It should reboot into diagnostics mode.

While you're in the diagnostics mode, plug the USB cable back in again and go to USB networking: Misc individual diagnostics -> Utilities -> Enable USBnet -> Exit. This will enable network access to your Kindle via USB.




Windows may fail to autodetect everything, if so you'll probably need to install a specific driver to access the Kindle over USB networking. This .inf file should do the job (I'm running Windows 7, Windows XP users need to do slightly more than this, good luck).

Once you have your driver set up, you'll need to configure the settings on your new network interface, set them to: IP 192.168.15.201 Subnet 255.255.255.0




Open your favourite SSH client (assuming that you have such a thing), I'm using Putty.

Try running Putty root@192.168.15.244 if that connects you're gravy, and your Kindle has a SSH server, if not and you get a "Connection Refused" then you're like me, so carry on.



Get SSH access to your Kindle (attempt 2, USBNet hack)


Download kindle-usbnetwork-xxx.zip from http://www.mobileread.com/forums/showthread.php?t=88004 extract it and copy update_usbnetwork_XXX_k4_install.bin onto your Kindle's USB drive. Safely Remove, unplug, then go into Settings, Menu, Update your Kindle. USB Networking should now be installed.

Restart your Kindle (not strictly necessary, but the Readme's recommend it).

Plug your Kindle in, and double-check the settings in D:\usbnet\etc\config (you'll need to use a text-editor that understands Unix line endings, Notepad won't work here, Notepad++, TextPad and others will work). In particular make note of the IP addresses, by default mine were set to:
HOST_IP=192.168.2.1
KINDLE_IP=192.168.2.2

On a Kindle 4, it's recommended to check that USE_VOLUMD is set to "true"

Following the README_FIRST.TXT from the usbnetwork zip:

  • Safely remove and unplug your Kindle,

  • You'll need to be in debug mode to run private commands, so, on the Home screen, bring up the
    search bar (by hitting [DEL] on devices with a keyboard, or the keyboard key on a K4, for example), and enter:

    ;debugOn

  • And now we can enable usbnet:

    ~usbNetwork

  • If you don't need to enter any more private commands, switch debug off.

    ;debugOff

  • Now, to actually connect to the device, we'll need to bring the shiny new USB network interface that the kernel prepared for us.

  • Plug the Kindle back in, wait for Windows to detect it, your Kindle should now be detected as something like a "RNDIS/Ethernet Gadget" or "CDC Ethernet Device network adapter" by Windows.

  • Then go into network settings, find the new network connection, and set the IPv4 settings to IP address 192.168.2.1 (assuming that's the HOST_IP that was set in your Config file above) and a subnet mask of 255.255.255.0.

  • To test it, open a command window and Ping 192.168.2.2 which should come back with a reply.

  • Now try Putty again:
    putty root@192.168.2.2

  • Hopefully this time you should get a connection and a warning message about the server's "host key". If so, say "Yes" to add the key to your cache, and then you should find yourself at a password prompt. A blank password works here, so you can just press Enter.
Congratulations, you now have SSH working. Careful, you can do a lot of damage here!

Install Kite (Kindle Application Launcher)

Now you need to install Kite, this lets you easily run custom programs on your Kindle. I tried installing Kite using the update package, with no luck, so here's installing it using the script method. First, download the kite.gz file from http://www.mobileread.com/forums/showthread.php?t=168270 and copy the kite.gz file onto the USB drive of your Kindle. If your Kindle is currently in USB Network mode, then you'll need to switch back to USB storage mode to copy the Kite installer onto it, as the usbnetwork command is a toggle, you can issue:
;debugOn

~usbNetwork

;debugOff
Once you've copied the files on, switch back to USB Network mode by issuing the commands again.
;debugOn

~usbNetwork

;debugOff
Plug your Kindle back into your PC again and test connectivity with a PING (depending what you've been doing in between, Windows may detect your Kindle as a new device again. If so, re-set the IP settings back onto the network adaptor as above, I went been to France for the weekend in between setting up USB Networking, so it happened to me). Connect to your Kindle's shell with Putty
putty root@192.168.2.2
Issue the commands to uncompress, and then run the Kite install script:
  • Mount the Kindle file system, type:
    mntroot rw

  • Move into /mnt/us:
    cd /mnt/us

  • Unzip the kite.gz file, and run the install:
    gzip -d kite.gz
    sh kite

Kite should now be installed, unplug your Kindle and then reboot it (Menu, Settings, Menu, Restart). As the reboot happens you may see a kite appear in the picture of the boy reading under a tree, or the land behind the tree may just flatten out, either are good signs. Once it's rebooted plug it back into your PC and check if there's a "kite" folder on the Kindle, if not create one (you may need to move/delete a file called "kite" first).

Next: Setting up the Weather Display on the Kindle


  1. Introduction
  2. Setting up the server
    • Weather Services
    • Getting the Image Tools
    • Scheduled Tasks
    • Download the Scripts
  3. Setting up the Kindle
    • Jailbreak your Kindle
    • Setting up USB Networking (1)
    • Setting up USB Networking (2)
    • Installing Kite on the Kindle
  4. Putting it all together
    • Setting up the Weather Display on the Kindle
    • Setting up Cron on the Kindle
    • Useful References and acknowledgments
    • Todo

Kindle Weather pt2 Setting up the server

Back to the first post in this series

Setting up the server


Matthew Petroff's original scripts assume that you're using a Linux server, they're made up of a BASH shell script (that won't do anything on a Windows box) and a Python script (that needs an extra install of 3rd party software to get it working on Windows), as well as relying on a couple of small tools that either aren't available to us, or don't work as well on Windows.

So to get things compatible with pretty much any Windows box, I've rewritten the shell script as a batch file and the Python script as VBScript, both of those should just work on anything from Windows 2000 upwards, and I've found some replacements for the small tools.

What you'll need for this section:

Create a new folder somewhere on your server (preferably outside of your web server's root) and download and extract the zip file into it. This should give you three folders, one of which is called "Server-VBScript", and in there are three folders called "ServerNOAA", "ServerWU" and "ServerMet" inside each of these you'll find an SVG, CMD and a VBS file. Now you need to decide which weather service you'll be getting your forecasts from, they all make their data freely available for non-commercial usage but have different coverage, may differ slightly in their forecasts of different areas and provide slightly different info, whichever one you want copy that service's folder into the new folder on your server:

  • NOAA - the US Government's NOAA's National Weather Service. The major downside (for me) is that they only provide forecasts for the USA.
  • WU - Weather Underground, run from a US University, they provide worldwide coverage, and in multiple languages
  • Met - Her Majesty's Government's Meteorological Office (The Met Office) forecasts. They only cover the UK (this is what I'm using on my Kindle)

Pick whichever weather service you want, and feel free to delete the other folders if you don't want them.

Weather Services


Depending which weather forecast service you pick, you'll need to find your location code, and possibly sign up for a (free) API key to use it, I'll go though these:

NOAA
All you need is to find the latitude and longitude of your location, and change these in the long URL inside the ServerNOAA\weather-script.vbs file using a text editor, also note that the final parameter in that URL "&Unit=e" sets it to the temperature in Fahrenheit, changing it to "&Unit=m" will output the temperatures in Centigrade.

WUnderground
You will need to sign up for a developer account at Weather Underground, and then you can create a (free for the usage level that we'll be putting it to) API key to access the weather reports. Once you have that you just need to work out your city's code, acceptable formats are:
CA/San_Francisco | US state/city
60290             | US zipcode
Australia/Sydney  | country/city
37.8,-122.4       | latitude,longitude

Then open up ServerWU\weather-script.vbs file using a text editor, find the line with the long URL in it and replace "APIKEY", "COUNTRY" and "CITY" with your API key and location.

Met Office
As with WUnderground, you'll need to sign up for a free API Key to use the Met Office's forecasts, once you have that you can visit the following URL to get a list of the location codes that you can use:
http://datapoint.metoffice.gov.uk/public/data/val/wxfcs/all/xml/sitelist?key=API_KEY
Take the 6-digit location code from there, and your API key, and plug them into the long URL in the ServerMet\weather-script.vbs file using a text editor.

If you've got everything set up right, then when you double-click the VBS file it should create an SVG file in the same folder, showing your graphical weather forecast. You can view this SVG file with most web browsers.

Getting the Image Tools

(Side-story, looking for a suitable replacement for the RSVGconvert *nix tool to do command-line SVG to PNG conversions I went straight to my old, faithful ImageMagick, but every version of that and every option I tried seemed to choke on the embedded icons, eventually I came across Inkscape and discovered it had a decent command line interface, so here we are)

Next download Inkscape SVG editor and extract it into an Inkscape folder in your server's weather folder.

Then download PNGCrush and save the file in your server's weather folder.

Your folder structure should now look a bit like this (the "public" folder won't have been created yet):


Then go into the folder for the weather provider you're using, open the CMD file and edit it to reflect the paths of all these tools, and change the references to the "public" folder to point to the location of the folder within your web server's root that will be serving up the PNG image.

Now try running the CMD file in your chosen folder by double-clicking it, and with luck after a few seconds your 'public' folder should now contain a PNG image that looks a bit like this:

typical English weather

Scheduled Tasks


Finally you'll need to decide how often you want your weather image to update and set up a Scheduled Task in Windows to run the relevant CMD file as often as you want it. Personally I'm going to have my Kindle updating its weather display 4 times a day, so I'm setting my scheduled task to run every 6 hours.


Download the Scripts

  • GitHub project: all files for the project browsable online, and individually downloadable
  • Entire project master.zip (72KB zip compressed file): if you don't know what a GitHub project is, use this link to download everything needed in one go.


Update 07/2016: files and download moved to GitHub, all previous updates merged in.



Next: Setting up the Kindle.


  1. Introduction
  2. Setting up the server
    • Weather Services
    • Getting the Image Tools
    • Scheduled Tasks
    • Download the Scripts
  3. Setting up the Kindle
    • Jailbreak your Kindle
    • Setting up USB Networking (1)
    • Setting up USB Networking (2)
    • Installing Kite on the Kindle
  4. Putting it all together
    • Setting up the Weather Display on the Kindle
    • Setting up Cron on the Kindle
    • Useful References and acknowledgments
    • Todo

09 June, 2013

Kindle Weather Display (from Windows)

I admit it, I'm interested in the weather. What can I say? I'm an Englishman and a sailor, I need something to talk about, and some way to know whether it's shorts weather, or if I need to take a brolly to work. Add in the fact that I love tinkering with gadgets, and have a mini server box sitting in the corner of my living room that spends large parts of the day doing very little, then I was very interested when I ran across Matthew Petroff's Kindle Weather Display blog post.


The only problem was that although he has all of the files available for download from that page, and a barebones hint on how to use them, it assumes a certain familiarity with Linux and its tools, and assumes that you're using a *nix server for the web server, and a *nix machine to do the install from, much of the Kindle hacking needed as a pre-req makes similar assumptions. I've barely touched Linux in the last 10 years (why deliberately make life hard for yourself when there's better choices out there?), was planning to set this up on my Windows Home Server box, and to do it all from my Win7 laptop. Clearly I was going to need to rewrite a few things, and work a few things out.

This is my tale of how that was done, so that you may read it, and do the same yourself.

To accomplish this you're going to need a few things that most people apparently don't have lying around their homes for some reason:

  1. A Kindle to dedicate as the display - while you could use the same Kindle that you use to read in bed at night, or on the train in the morning, that really won't be very convenient. Beware also that we're going to be hacking the Kindle and doing some (potentially harmful to the Kindle) things that will not be covered under your warranty. That said, if you hunt around you can find Kindle 4's for a fraction of their retail price on eBay, the one I'm using is an ex-shop demo unit that I got for a hair under £20.
  2. A Windows server (or at least a Windows box, doesn't necessarily have to be server hardware or a server OS sku) that will be switched on all the time, with an "always on" internet connection (the server itself doesn't need to be accessible from the internet). I have an old Tranquil PC SQA-5H that I use to run my home services, so that'll do me.
  3. A web server installed and running on your Windows server - all we need is a way to serve static PNG images over HTTP, so you won't need anything fancy. Personally, I'm using a Windows Server SKU, so I'm using the built-in IIS web server but pretty much any web server will do, Apache is probably the next most common, and I've used that for projects in the past.
  4. A basic plain text editor that understands the difference between Windows and Unix line endings.
    MS Word absolutely won't do, that's a Word processor not a text editor, Windows Notepad is no good either as it can't handle Unix style line endings. Something like Notepad++ or TextPad (which I'm using) would be perfect for this, many programmer's IDEs (such as Komodo, Eclipse or Visual Studio) also include this if you already have one installed, but don't go installing an IDE just for this as it really would be overkill.
  5. A basic familiarity with Windows and basic, common Windows tools - I'm happy to walk you through the Unix/Linux tools and commands but I'll expect you to know what you're doing on the Windows side

Warning: this is going to be a long one, so I'm dividing it up into a few parts over a few days, click any of the links to skip to parts you're interested in, or read the whole series to do it all. You can do some of the following steps in different orders, but I found it easiest to start with setting up the server while I was still searching eBay for a cheap Kindle.

Next: Setting up the server.


  1. Introduction
  2. Setting up the server
    • Weather Services
    • Getting the Image Tools
    • Scheduled Tasks
    • Download the Scripts
  3. Setting up the Kindle
    • Jailbreak your Kindle
    • Setting up USB Networking (1)
    • Setting up USB Networking (2)
    • Installing Kite on the Kindle
  4. Putting it all together
    • Setting up the Weather Display on the Kindle
    • Setting up Cron on the Kindle
    • Useful References and acknowledgments
    • Todo

30 January, 2011

Dropbox

Just started using Dropbox to sync between my PC, server, Android phone and the web, it really is great. Easiest and simplest syncing solution I've found.

Had been thinking about it for a while, and then it was Gina Trapani (of TWiG fame) releasing her new Todo.txt Touch Android app that finally convinced me, as it uses Dropbox to do the behind the scenes updates.

If you sign up for Dropbox please use my affiliate link Sign-up for Dropbox as it will get us both an extra 250MB of storage on our accounts for free. Thanks.

19 August, 2008

EVE Central Market Upload Utility Trojan Keylogger Warning

Please see the update at the bottom of this article. I no longer suspect EVE Central or it's Market Uploader utility of any wrongdoing here.

So a friend of mine found that around a £1000 of money had been siphoned from his bank account recently (all in bank transfers of under £150). After talking to the bank about he found that the attacker had got into his bank account using the web login.

The question then became, how did they get his password? Like me, he works in IT so is pretty savvy about security generally, so had no idea how anyone could have got a keylogger onto either his home or work PC.

After much searching around he finally found this blog post a Mule in EvE: Learn and live to fight again that pointed to the fact that someone else had found a Trojan keylogger (a piece of malicious software similar to a virus that logs all of your typing and sends it to someone else on the internet) hidden inside the popular Market Upload utility from EVE Central. This is a popular tool that allows players of the game EVE Online to upload data about the ingame market place to a website where analysis can be run.

He rang me to let me know (as I also play EVE and have this tool installed), and sure enough a "deep scan" by Sunbelt Software's VIPRE Antivirus found the following trojan on my PC: Trojan-Spy.Win32.KeyLogger.acm, hidden in the "evec_upload.exe" file in the "EVE-Central MarketUploader".

Not good news, so one removal, uninstall and a few hours changing passwords later, here we are warning the rest of the public about this. As EVE-Central doesn't have any kind of public forum to post in, I'm putting this up here whilst I mail the developers for comment.

Please note that I am not blaming the EVE-Central developers here at all, I have no idea whether they are simply the victims of being unwittingly hacked themselves, or whether they are doing this deliberately. Also there is the possibility that this could be a false alarm and something in the way the Market Uploader was written is accidentally triggering a false warning in the anti virus software.

I am also most definitely not blaming CCP or EVE Online. CCP have made a great game that many, many people enjoy every day, and neither myself or EVE-Central are affiliated with them.


Update 20/8/08: Having carried out further investigation and emailed back and forth with Yann of Eve-Central it seems that we were too hasty assigning blame here. I no longer suspect EVE Central or it's Market Uploader utility of any wrongdoing here. I'm sorry for any misunderstanding or distress that could have been caused by this.

An up to date version of the VIPRE Antivirus doesn't pick up the "EVE-Central.com MarketUploader" as any kind of malware (or 'bad' software) at all.

From Yann:

I've been distributing the same package file since mid 2007. Its been at some time been listed as a Trojan all these major AV products, but detection had improved so the false positives were eliminated within a few update cycles.

It seems that some fairly old virus was written by someone using the same software that Yanne used to create the Market Uploader. This means that it has ended up looking slightly similar to an old virus, and has been at one time flagged up by many of the major anti-virus products, and then cleared again a few updates later as they fine-tune their virus detection.

This is a bit like if I used the same powerdrill to put up my shelves, as some serial killer used to do nasty stuff to people. Just because we both used the same tool, and both used it to drill holes, doesn't mean that I had anything like the same intention or outcome as the murderer.

Hmm tortuous analogy!

04 March, 2008

EveBerry

This post's been sitting in my queue for a while, sorry!

Vlad (of Mozilla and Firefox fame) posted to the EVE-Online fourms a while ago about his new EveBerry tool, that can be downloaded here: EveBerry -- a BlackBerry EVE Character Monitor:.

It's similar to EVEMon and market monitoring apps, but for your Blackberry smartphone (assuming you have one, I do) and is very, very cool and very, very useful.

That's all!

I CAN HAS BOTZ

Since my last set of Lol Bots images (featuring Red Dwarf's Kryten, Ghost in the Shell's Tachikoma and Fritz Lang's Maria), the site seemed to go quiet for quite a few months. Luckily over the last few weeks rstevens has grabbed the editorial reins back and posted a slew of new images, including two more of mine.

I started off a little late for Valentine's with Kryten and Camille:

(It really was E5 A9 08 B7, no need to spell it out)

And finally got a bit of my favourite geekery in with 3PO:

(Metal body: 1, Fragile Skin and Bones: 0)

18 June, 2007

Safari for Windows Update

An update to the previous post: Safari for Windows.

I'd like to say that the Safari 3.01 beta update fixed the problems with my curved borders mentioned in the the previous post, but I probably ought to stick my hand up and admit that uploading the updated CSS file that's been sitting on my hard disk for about 2 months is almost certainly what fixed it! So Safari's new border radius properties do actually work on Windows, and they really do look gorgeous, all anti-aliased and shaded, against Firefox 2's pixellated efforts, or IE 7's non-existent effort :).

However still some quite quirky UI issues:
I'm really not sure I like the way that the Preferences window shrinks and grows every time you change tabs, and the fact that it's all instant apply with no 'OK' or 'Cancel'.
Also the Mac-style window re-sizing is really beginning to wind me up, particularly as the cursor doesn't change to the 'double-headed' resize arrow until after you start dragging in the one place that actually works, so there's absolutely no clue which parts of the UI you can or can't grab to resize until after you click the mouse to try it!
And finally just noticed that clicking the File menu on a non-resized window (with my Classic XP style) gives a really ugly blocky overlap of the window edge.

11 June, 2007

Safari for Windows

So Apple have just released a beta of the "Safari 3 web browser for Windows!Windows Safari

First impressions are great, all my web sites, and my favourite sites seem to work well, and look beautiful. Text flowing around flowing objects is definitely better than Firefox 2 or IE 7. Text just looks great full stop.

Downsides, its a bit like when Apple first shoved all that brushed chrome theme stuff over Quicktime for Windows, its just not a Windows app at the moment. You can't drag window borders to resize, you can't even drag window corners (except for one in the bottom right).Windows Safari - menus with coloured borders Also if you're using XP with the Classic theme the menus are a bit messed up :).

Just remember to deselect all the stuff-ware that you don't want when you download and install it (the default download bundles Quicktime, and it tries to get you to install some network discovery tool as you install).

Hmmm seems to dislike my curved borders, even though I'd thought that I had the Safari CSS right, guess there's nothing quite like actually testing to find out what happens instead of just crossing your fingers and hoping!

Via Asa and Burnt Electrons.

UPDATE 18/6/07, see the follow-up post.

10 June, 2007

LOL BOTS for teh w1n!

I never really got the whole captioned (or macro-d) kittens craze, as exemplified at I CAN HAS CHEEZBURGER, maybe its because I'm just not a cat person (the guinea pigs work for me though).

However LOL BOTS is a concept that I can totally get behind. And have. My three submissions to the site (so far) are below:

I started off by injecting a little bit of class into the proceedings:

(I feel that I really ought to apologise to Fritz Lang at this point)

Then a little bit of hungry tachikoma:

(Maybe they really do have a ghost?)

And finally some boyz from the Dwarf:

Smeeee-ee-eeeeh-eeeg heeeeaaad

And almost certainly more to come!

PS Is it just me, or does xkcd have a comic for every occasion?

12 February, 2007

Youth, Privacy and the Modern World

Okay, I'm not even 30 yet and things have conspired to make me feel old. I thought I was in touch, a real geek and a full part of the internet generation. It turns out that I may be some of that, but I still have one foot in the old world.

I read somewhere recently where a member of the 'older generation' was talking to a 'youngster' about calendars, and the youngster couldn't understand the concept behind having an Outlook calendar saved on your PC:

Why would you want a calendar that no one else can access?

Now, I've had an electronic calendar for about ten years now. Spread across work computers (using Lotus Organizer and then Microsoft Outlook), various models of Palm handheld, two different Blackberrys (what is the plural of Blackberry?), home PCs (Palm Desktop) and online (Google Calendars and Outlook Web Access). Most of these have synchronized back and forwards with each other in various ways creating a long history. Outlook is storing it's calendar on the Exchange server and publishing my free/busy info to the rest of the company, but not the actual appointments. The Google Calendars are shareable, but not shared.

I should be right there with this, but despite my techno-geekery, I am still stuck in the dark ages of having your own calendar that is yours, and yours alone.

Apparently I'm not alone in this, and one of the symptoms is that I don't regularly bare my soul (and other things) on LiveJournal or YouTube. I have two blogs (and have been nearly writing my own blog software for years now, but as you may have noticed, there is very little personal sharing here. I don't have a MySpace page, in fact as far as I can tell its just the new GeoCities (all lurid colours, randomly placed animated pictures and scrolling text). I have a love/hate relationship with my mobile phone (But I don't always want to be contactable!).

I'm very aware of privacy and how 'big brother' is tracking me, I make conscious trade-offs between my privacy and convenience/cash. I don't have any store-cards, but I do have credit cards and an Oyster travel card. I realise that I work in the City that has more cameras per square meter than anywhere else in the world, and I'm sure they have caught an awful lot of pictures of me doing very silly things. I've never had a full-face picture of me as my MSN Messenger picture, yet I've published web pages with multiple pictures of me drunk at parties.

I do have friends that I only know online and I've never met, but they are by far outnumbered by the people I only know in real-life and wouldn't have a clue how to contact them online in any way other than email (generally just a work address).

I used to post to Usenet with my full name, location, web page, email and (later) ICQ IM address. Later on my web page I listed most of the above and had contact links on every page. These days I rarely post to Usenet (although many of my old posts are accessible via Google Groups if you know what you're looking for), I post to forums and blog comments semi-anonymously and although my web page may have my full name, it has pretty much no contact details and the CGI contact form has been disabled after it just became an easy way for spammers to send to me.

I'm cutting off much of my public online presence just as so many are sharing more and more of themselves.

This sums it all up perfectly:

There is another way to look at this shift. Younger people, one could point out, are the only ones for whom it seems to have sunk in that the idea of a truly private life is already an illusion. Every street in New York has a surveillance camera. Each time you swipe your debit card at Duane Reade or use your MetroCard, that transaction is tracked. Your employer owns your e-mails. The NSA owns your phone calls. Your life is being lived in public whether you choose to acknowledge it or not.

So it may be time to consider the possibility that young people who behave as if privacy doesn't exist are actually the sane people, not the insane ones. For someone like me, who grew up sealing my diary with a literal lock, this may be tough to accept. But under current circumstances, a defiant belief in holding things close to your chest might not be high-minded. It might be an artifact -- quaint and naive, like a determined faith that virginity keeps ladies pure. Or at least that might be true for someone who has grown up ":putting themselves out there": and found that the benefits of being transparent make the risks worth it. [...]

For anyone over 30, this may be pretty hard to take. Perhaps you smell brimstone in the air, the sense of a devil's bargain: Is this what happens when we are all, eternally, onstage? It's not as if those fifties squares griping about Elvis were wrong, after all. As Clay Shirky points out, ":All that stuff the elders said about rock and roll? They pretty much nailed it. Miscegenation, teenagers running wild, the end of marriage!": [...]

Right now the big question for anyone of my generation seems to be, endlessly, "Why would anyone do that?" This is not a meaningful question for a 16-year-old. The benefits are obvious: The public life is fun. It’s creative. It’s where their friends are. It’s theater, but it’s also community: In this linked, logged world, you have a place to think out loud and be listened to, to meet strangers and go deeper with friends. And, yes, there are all sorts of crappy side effects: the passive-aggressive drama ("you know who you are!"), the shaming outbursts, the chill a person can feel in cyberspace on a particularly bad day. There are lousy side effects of most social changes (see feminism, democracy, the creation of the interstate highway system).

From: Kids, the Internet, and the End of Privacy: The Greatest Generation Gap Since Rock and Roll -- New York Magazine. Via JWZ.

But maybe the problem is that at heart I'm just a bit too schizophrenic about this, I really have got one foot in each camp. I just feel like at times I'm both people in XKCD's "Dreams":

Dreams by XKCD

20 December, 2006

ServiceCenter/Firefox Printing Redux

Some may remember this post from back in July when I was having trouble printing from a web app after upgrading from Firefox 1.0x to Firefox 1.5. Wherein I laid out a way to fix the problem using a custom usercontent.css file, and also logged a bug on the Mozilla Bugzilla system.

Well it looks like its come to an end! Not with today's Firefox 2.0.0.1 update, as you might imagine. But the latest 'Minefield' (Firefox 3 alpha) builds have the new "reflow" changes (from Dbaron's bug 30030) in them.

And it works!!

So now we just need to wait for Firefox 3's release and the whole world can feel the love!

25 September, 2006

Active Directory Group Membership Queries

The problem with being known as the person who can pull a list of group members from AD into a text file in a few seconds, you become a "go-to guy" for other AD queries. Which wouldn’t be such a bad thing, except that there aren't pre-written scripts for them all! I received a request today to ask if I could pull out a list from AD of everyone who was a member of both a departmental group and a security group, here's how I did it.

List the Members of an AD Group

For anyone who doesn't know already, there are a couple of easy ways that I know of to print a list of the members of one active directory group to a text file:

The "Command Line One-Liner"

As always with something that looks simple you need to put in a little work first, this time it’s very easy. First download the very useful psExec utility from the Sysinternals website. This handy little tool lets you run commands on a remote machine as if you're logged directly onto it. Extract that and save it somewhere, preferably in your path.

Now all you need are a few bits of information that you should already know if you’re thinking of running this sort of query: the name of a domain controller on your network, and the username and password of an ID that has admin rights on that DC (unless your normal login account has these rights, in which case you really ought to do a security review ;-) ).

Then run the following command from a command prompt:

psexec \\domain_controller -u domain_slash_userid -p password net group "group name"

This will list all of the group members to the command prompt, to redirect this output to a text file, just add "> c:\temp\groupmembers.txt" to the end, eg:

psexec \\domain_controller -u domain_slash_userid -p password net group "group name" > c:\temp\groupmembers.txt

The VBScript (or Perl) Method

Go to the Active Directory Cookbook's Source Code page and download Script 7.2 "Viewing the direct members of a group" in VBScript format (or Perl if you have Perl installed and are more comfy reading that).

Save the script somewhere, open it up in Notepad and replace the <groupdn> bit with the path to your group. Now change to a command line and run either:
"cscript View_Group_members.vbs" (for the VBScript version) or
"perl View_Group_members.pl" (for the Perl version)

While it is possible to just double-click either file in Explorer to run them, you don’t want to do that; the VBScript version will pop up an alert box on screen for each group member (meaning if you have a group with 100 members, you’ll get 100 alerts on your screen one after the other, each one wanting you to click OK), whereas the Perl version will dump its output to the command line then close the window before you have time to read it. So drop to a command line to run them.

If you want to send the output to a text file then (as above) just append a right facing angle bracket and the name of a text file, eg: cscript View_Group_members.vbs > c:\temp\groupmembers.txt perl View_Group_members.pl > c:\temp\groupmembers.txt

Listing Everyone Who is Both a Member of Group A and Group B

(intersection of groups A and B)

Now listing everyone who is a member of both Group A and Group B is slightly more difficult, and I couldn't find a script online that pulls that out for you - so I wrote one myself. This is a Perl script as I've known Perl for years, and whilst I can read simple VBScript fairly well I wouldn't want to try writing it. So if you want to run it you’ll need to have a version of Perl installed, I can recommend ActiveState’s ActivePerl (see below for download instructions).

This is an adaptation of the above Perl script (http://rallenhome.com/books/adcookbook/src/07.02-view_group_membership.pls.txt for anyone who hasn't downloaded it yet) that pulls out the members of the two groups, hashes them, then prints the intersection to the command line.

The fine print at the bottom of the Cookbook's source code page seems to suggest that it’s ok to modify and distribute the code as long as the acknowledgement and citation are kept intact. So you can click to download my "Viewing the intersection of members of two groups".


Note 1: Downloading ActivePerl

(Note to self: see also Kbase 1027070447)

27 July, 2006

Unisys ServiceCenter Firefox printing fix

For anyone still living in Unisys-land (aren't I glad they're not filling out my wage slip any more smile ), and for anyone else forced to use their "idiosyncratic" (read shite) web tools here's a little something.

If you've been forced to use the web (ie HTML not Java) version of their (Peregrine-based) ServiceCenter tool, you'll notice that its dog-slow if you're using IE and has a whole myriad of intermittent problems. The obvious, and really quite effective, solution is to use Firefox. This speeds up ServiceCenter measurably and seems to get around most of the other problems.

Or at least it used to. Firefox v1.0 to v1.08 all work absolutely perfectly, but Firefox 1.5 introduced one teeny-weeny and yet show-stopping printing bug that stops you from being able to print any useful info from ServiceCenter (technical details here in Mozilla bug 326162 if you're interested). Unfortunately according to the recent Firefox 2 beta release it doesn't look like it'll be fixed in Firefox 2 when that's released , and checking Firefox trunk (the ongoing work to create the not even alpha yet Firefox 3) the bug actually looks even worse at the moment.

So after reading this page on creating your own "user stylesheets" in Mozilla and this page that mentions a new experimental CSS rule, I put two and two together and actually came up with four for once!

So here's how to get Unisys ServiceCenter printing correctly in Firefox versions 1.5 and newer:

  • Download a recent version of Firefox
  • Run it
  • Close it
  • Find your Firefox profile folder (see here if you can't find your profile folder, and bear in mind that your profile may be in a Windows network roaming profile, or may be on your C drive).
  • Inside your Firefox profile folder look in the "Chrome" folder
  • Do you have a file in there called "userContent.css"? If so, open that file in Notepad, if not create a new text file with that name and then open it in Notepad.
  • Paste the following text into the "userContent.css" file:
    
    /* Fix b0rked ServiceCenter printing in Firefox 1.5+
    see Mozilla Bug 326162 https://bugzilla.mozilla.org/show_bug.cgi?id=326162 */
    
    @-moz-document domain(www.sc-ps.unisys.com){
    div.labl, div.val { overflow:visible !important; } }
    
  • Save the file
  • Open Firefox
  • Re-visit ServiceCenter and try printing a ticket out
  • Send me thanks, adoration, first-born children, money or just leave me a comment below saying how it worked out for you (actually forget the first-born children I wouldn't have a clue what to do with them).

One final note, Unisys have been known to change the server these web apps are on periodically, if so you need to edit the bit that says domain(www.sc-ps.unisys.com) to reflect the new server name. This may or may not work for other company's Peregrine web interfaces, may be broken at some point in the future by an upgrade to the website or to FIrefox, YMMV). Also this Mozilla bug may be fixed at some point in the future, so at that point you can safely delete the above lines from Firefox's userContent.css.

09 May, 2006

At last they're mine!

Remember way back when when I entered the MSN World's Best App competition with my Connect Four game?

Remember just a few months back when the winners were announced?

Well... my second place prizes have (finally) arrived! I'm currently playing around with my Oakley Thump sunnies, loading them up with music and looking just slightly silly :).

Also included in the prize is a nice, shiny copy of MS Visual Studio 2005 Pro (worth more than the rest of the package put together) and every Oakley Thump accessory available (but one). Its like Christmas came in May!

Looks like I'm going to be wearing my sunnies everywhere I go for the next week or two come rain or shine.

Just gotta finish by saying W00t new goggles! Thank you Microsoft!.

06 February, 2006

Maximum w00tage!

So MSN just announced the winners of their World's Best App contest today (or maybe late yesterday, can't do these timezone calculations in my head


Have a look down the list of winners, see that game in 2nd place called Connect Four? I made that

Edit 11/2/06:
Looks like its official! The official "Inside Windows Live Messenger" blog has just posted an article on Messenger’s Worlds Best App Contest Winners.

01 February, 2006

The most useful tool ever?

Microsoft XML Diff and Patch 1.0

Alright, maybe its a bit of an exageration, but this really did save my bacon the other day, and it is very useful if its what you need and things are formatted badly enough that WinDiff can't help you.

16 December, 2005

Play Connect 4 in MSN Messenger!

My first entry to the MSN World's Best App competition, an online, multi-player version of the classic Connect Four game, has just made it through the checking process and is now live on MSN!

Please try it out, have a game with me, or anyone else you know on Messenger: Just click here to play multiplayer Connect Four! (requires Internet Explorer and MSN Messenger) Please play it as much as you can, and if you have any comments, questions about it or problems with it I'd be very grateful if you could please leave me feedback on my MSN Space.

Thanks, and please play it as much as you can, every time you launch the app counts as a vote for me :).

Oh, and if you've got your own MSN Space and you'd like to spread the word, just click the BlogIt! button to put it straight on your Space.

11 December, 2005

MSN Compo Entered!

Have finally got round to submitting my first entry to the MSN Messenger World's Best App Contest. Thanks to everyone who's helped me out with the testing of this one and the little test apps, especially the people who pointed out my bugs mistakes deliberate errors.

Just got to wait for it to appear now, and see how the world takes me!