I’ve been meaning to move from the old standby of screen to tmux for the past getting an environment configured has been standing in the way: I’ve perfected my screen layout, and if I’m going to switch over, it needs to match. Everyone seems to accept that tmux has a more powerful/sane config language – and it does – but I’ve grown used to screen’s…eccentricities.
I delivered this presentation on using the Mock library to the Toronto Django meetup. The slides should be pretty self-explanatory (once you hit slide #7 and are past the introduction); if not, check out the speaking notes.
By and large, their API is well-documented. However in poking around and having various support chats, I’ve discovered the following under-documented things, some of which may be useful for someone else to know:
Finding movers is tough.
Any time I need to move the same options get considered: do I do it myself, call one of the big moving companies, press my luck on Craigslist, send a message around and see who’s moved recently, etc. For my recent move from Ottawa to Toronto, I went for option two. After a big of searching, I ended up going with TriServices (based out of Ottawa) – and I’m happy to report they were great.
They kept in good contact with me in the run-up to moving day, packed and wrapped everything securely (major furniture only – I packed everything small into boxes myself), showed up exactly when they said they would, and charged me no more and no less than what their first email estimate said. Plus, both guys spoke excellent English, and answered their mobile phones eagerly when I would call and ask for an update (the answer was inevitably “everything’s on schedule”). In terms of movers, that’s pretty much my perfect list of behaviors right there.
If you need to move things from Ottawa to Toronto or around Ottawa, I would recommend these guys without hesitation.
For the record, I haven’t been paid for this endorsement (or been asked to write it) – consider this an attempt to help out the Internet hive-mind.
I’ve recently bought a Huawei E1691 mobile internet stick from WIND Mobile, to make up for not being able to install a TekSavvy line at my current apartment. The Speedtest.net results are nothing spectacular – 1.3Mb/s in an open-air café in downtown Toronto – but it’s more than usable for my basic internet needs. WIND’s default DNS servers, however, are…slow. I think we all know what this calls for: Google public DNS.
Do the following three things apply to you?
- You’re developing a WordPress plugin?
- You’re using github for your workflow?
- You’re looking for a simple, single-command way to deploy the newest version of your plugin to WordPress.org’s svn repository?
If so, look no more.
In developing a WordPress plugin, I’ve been pleasantly surprised by the documentation. The codex is through, and links to the source code in the cases when it’s not deep. Having said there, there were a few snippets of code that took some searching to find and explain – common things that almost all plugins will (should) use, but weren’t obviously listed.
I was recently looking for a quick and easy way to convert a
dict object into a corresponding XML fragment. For this particular use, there are no complex requirements; I’m only looking to use the key of each dictionary entry as the XML tag, and the value as its text. Using the excellent ElementTree library, this is both functional and somewhat Pythonic:
This function will work if you’re dealing with – as I was – a very simple
dict. If your source object has anything more complex than strings or numbers as values, check out something more sophisticated like Pyxser.
from elementtree.ElementTree import Element, SubElement def DictToXML(inp): i_root = Element('item') for (field, val) in inp.iteritems(): SubElement(i_root, field).text = val return i_root
When signing up for online services, I don’t like to use my real email address. While the vast majority of services are reputable nowadays, I don’t want to end up in a situation where Gmail’s spam filter is my inbox’s last line of defense. In order to make this usable, I have two requirements:
- Create specific email addresses for each service I sign up for, and make the connection obvious between the address and the service.
- Not do any extra work at point-of-signup.
I should be able to do this with Gmail’s plus-addressing, but most places don’t accept those emails as valid. Bearing that in mind, I have come up with the following solution, using Google Apps: