Programming
Dropping Drop.io
I was recently tasked with the mundane job of downloading ~40 images from a Drop.IO hosted album. Drop.io is one of the several providers of online file swaping, similar in style to the Dropbox service
What irked me about Drop.io is that there was no immediately apparent way to download the full size versions of the pictures quickly. To download even a single picture took far more clicks than I was willing to endure. Downloading the images I needed was akin to a hardcore session of Diablo 2. My mouse may never recover. Web 2.0 AJAX-y interfaces have their place, but I want efficiency.
To that end I dug through all of their javascript and was able to uncover how I could automate getting access to the full URL for each image (not an easy task by any means through the normal UI). I spent an hour or two brushing off my Javascript skills and learning how to write a Greasemonkey user script for Firefox. Greasemonkey is an extension that allows you to install hunks of javascript that automatically load for specific sites to modify them client-side. (Honestly it’s worth installing the extension just to get the cute little monkey icon in your bottom status bar). My script automatically links all of the thumbnail images in an album to their full downloads.
It was fun writing Javascript after spending the past semester trying to adapt myself to functional programming in LISP and Clojure. Once you forget that the syntax is very C-like and program it in a functional & dynamic style Javascript can be a lot of fun. Greasemonkey was also surprisingly easy to pick up in an afternoon. No complex API’s to learn or anything; it’s practically plain JS all the way through.
It’s worth noting that if you have the fantastic Down Them All firefox extension installed you will be able to download the entire album’s full size images in one click using the custom filename pattern: */original_content
I’ve only tested this script using Firefox 3.5.6 with Greasemonkey 0.8.2 so there may be dragons. The Greasemonkey website has instructions on how to install scripts Follow those and browse to a Drop.io album of your choice. The rest happens automatically.
Enjoy!
Download dropio_pic_grab.user.js
- Dan
High-speed note taking with Textile
It’s no secret that I’m a Computer Science student. From this you can infer a couple of things fairly reliably:
- I have terrible handwriting
- I take class notes frequently
- My computer spends enough time with me that it might as well be an appendage
- I’m lazy and want to script away anything mundane
This article is the result of my experiments with note taking strategies. The final result is a Python script for processing notes taken in a simple wiki-like Textile markup and outputting nicely styled XHTML.
read more...JRiver Advanced
My open source project to make MUDing accessible. I want to promote new and interesting mash-ups with the MUD paradigm. JRiver will be LP inspired, but abstract enough to handle several game types: MUD, MUSH, MOO, Talkie, etc. We’re aiming to be general wherever we can and providing game-specific example lib code where we can.
read more...Deflash Script
Many people are aware of HTTP cookies, generally used to add statefulness to the otherwise stateless HTTP protocol. Great for session tracking, preference persistence, etc. Also great for privacy invasion and general ad tracking. Due to the perceived privacy issues, many users delete their browser cookies frequently.
Unfortunately Adobe Flash contains the seldom publicized ability to create it’s own persistent tracking objects outside of the control of your browser. It isn’t very easy to clear these persistent flash objects, and due to being relatively unknown, marketers are now using them to “respawn” traditional HTTP cookies. I.e. when a site wants to track you it will set an HTTP cookie AND a flash “cookie”. If the page detects later that you have a Flash cookie but no HTTP cookie it will recreate aka “respawn” the HTTP cookie using the Flash data.
read more...Powershell Backup Script
I’ve been playing a bit with Windows Powershell (codenamed Monad). Not a bad piece of software all things considered! Certainly a world better than standard Windows XP cmd.exe.
My problem task was that I needed a basic backup script that I could add as an ‘at’ job for a Windows Server 2003 box at work.
It is a very small time operation so all of our backups are stored on two external harddrives. At the end of each week we swap the currently plugged in drive and cycle it out with the second drive. This way we can have one backup drive stored offsite and in a worst case scenario, we’ve only lost a week of data.
read more...LPC Ghetto AOP
A problem was recently posed to me: _“If I wanted to selectively block the evaluation of add_action() functions based on
certain criteria known only at run-time, how would I go about it?”_.
…
After some deliberation the coder in question and I were able to begin forming the idea of a “guardian” function. Drawing on concepts from Aspect Oriented Programming like the idea of “before advice” we decided to try interjecting a function before the real deal that would be able to evaluate whether or not the actual function call would be performed.
read more...Nautilus SCP
I don’t know about you, but I find myself using SCP quite frequently to transfer files from my laptop to my server. It’s almost always from one specific code folder to another, and almost always to this one particular machine. I enjoy the flexibility of having two separate folders, and rsync seems like overkill. I’m happy with the minimal configuration setup I have. Much of this happiness is due to a bash script I wrote and used to extend the gnome file browser: nautilus. This script can be activated on any number of files just by selecting them in the GUI, right clicking and choosing to invoke it. Very handy!
read more...LPC Events Inherit
I have created a quick new inherit that allows for something called event driven programming in LPC. My hope is that this inherit will allow people to create more light weight lib files for things like guild objects and monster inherits.
read more...