Slippery Snippets

Tuesday, June 23, 2009

Dead?

I ain't dead. I'm just resting.

Just thought I'd let anyone who's still tracking this blog that there are some updates to the plugin in the svn repository on Google Code: http://code.google.com/p/snippetsemu

I'm hoping to package these up into a release at some point in the (very) near future.

Also, I'll be at EuroPython next week, so feel free to file bug reports in person if you're there as well.

Monday, February 25, 2008

1.2.2

Spare time plus a working version of bzr-svn has meant that I've had a bit of time for bug fixing. 1.2.2 is therefore now on vim.org.

One big change: the plugin is now separate from the bundles. At the moment they both live on the same page, as I don't think it's worth setting up a new page.

Get downloading!

P.S. Many thanks to everyone who's voted for the plugin. It's now sitting at number 24 out of 2149. Quite an achievement given what the first version looked like...

Sunday, September 30, 2007

The Usual Suspect

The usual problem has cropped up - line endings. A new version will be posted shortly. There also seems to be a problem with the version of Vimball which ships with the Windows version of Vim. Those viewing the file will have some nice folds to aid navigation around the file; unfortunately, under *nix the fold markers get added to the file name. Not very useful.

An interesting point made in the comments:

Your latest vimball has DOS line endings, and svn is still at the last version :(
The reason SVN is the last version is that bzr-svn was not able to push the latest changes up to Google Code. Now I'd like to point out that this is most likely my fault; I noticed that the author of bzr-svn linked to one of my posts about how the plugin didn't work under Windows. Just to clarify - this was due to my lack of effort more than anything else.

I've also enjoyed using bzr and so I'm considering moving to a bzr hosting environment. I'm going to investigate Launchpad but I'd welcome any other suggestions.

1.2 just for you

Well Blogjet turned out to be a waste of time - its Blogger support is broken, so I can only post new stuff. Given my posting habits that seems like a waste of money, so no upgrading for me.

Anyway - down to business. I've finally managed to release a new version of the plugin, so grab it form Vim.org: http://vim.sourceforge.net/scripts/script.php?script_id=1318

There's a few new features - commands have autocomplete to help you browse the bundles. There are two new commands to help create new snippets and there's a load of bug fixes and bundle updates, so get downloading!

Monday, September 10, 2007

Testing BlogJet

I have installed an interesting application - BlogJet. It's a cool Windows client for my blog tool (as well as for other tools). Get your copy here: http://blogjet.com


"Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination." -- Albert Einstein


It also presents you with this as the default test post, so I’ll help the Google rankings and let it get posted. Hopefully this should allow me to post a little more. I’ve tried typing up some posts in Vim, but I think that this will be a better solution. Let’s see, eh?

Thursday, July 26, 2007

Wherefore art thou not working under Windows

Hello all.

Still stuck in the Midlands, so posting and development have pretty much ground to a halt. I did manage to do a bit of hacking the other day, but I can't get bzr-svn working under Windows, so you'll have to wait until I'm next in Linux for the next push to trunk.

Anyway, since my last post I've been playing around with wxPython and Django; in particular trying to use one to display the models from the other. During this I ran into another Django bug (second one to stop me in my tracks) and some random behaviour which I didn't quite agree with.

In a huff I decided to try out Pylons - mainly because because it plays well with SqlAlchemy.

It's hard work getting going with Pylons - documentation is nowhere near as complete as Django's but if you're prepared to hunt through the source most things become apparent. The IRC channel is very friendly as well, though you sometimes have to wait for America to wake up.

Here's my handy Pylons tip for the day:



def screenshot(self, id):
i = model.Screenshot.get(id)
if i:
im = Image.open(StringIO(i.image))
pylons.response.headers['Content-Type'] = "image/%s" % (im.format and im.format.lower() or 'bmp')
pylons.response.headers['Content-length'] = "%s" % len(i.image)
if request.params.has_key('thumb') and request.params['thumb'] == "True":
im.thumbnail(THUMB_SIZE, Image.ANTIALIAS)
w = StringIO()
im.save(w, im.format)
return str(w.getvalue())
abort(404)


The above action pulls an image out of the database and serves it up. If the GET has thumb=True set then you'll get a thumbnail instead.

I know that you're not supposed to serve images from the DB but, trust me, I have good reason for doing so.

It also looks as though there are some issues when returning large images; it's been suggested that FileApp.DataApp is the way forward.

Saturday, May 19, 2007

Another demo

Spotted this one thanks to Google Alerts.



Shiny.

Friday, May 18, 2007

The 911 of action movies

Okay, I did not know that they were making a new Die Hard so finding the trailers was a nice surprise.

Once the helicopter was blown up by the car, once the plane had flown under the bridge, once the car didn't hit them because of the other cars, once Bruce had jumped off _the jet_, I decided. This film will be the film by which all others will be judged. It will be a brave film that dares to try anything similar.


The 911 comment? If Porsche puts a DSG in one of those then everyone else should just go home.

Changes Afoot

I've checked in some new changes. Hopefully these will result in a new version sometime soon.

There are a couple of changes which may cause some issues. Firstly, I've removed the 'local indent' requirement of the last version (1.1). It was implemented to solve some issues with indenting but I've found a different way to work around the problem.

Secondly, I've removed the use of 'iskeyword' for matching special characters in tags. This changes the contract slightly: special character triggers will require whitespace before them.

An example. In the Django templates the trigger '{{' will only be expanded if there is whitespace before it. Other characters which previously worked ('#', for example) will no longer do so.

So, get posting your bug reports and I'll try and get fixes into the next release. I'm using bazaar for revision control at the moment as I'm not the net much. As a result I'm thinking of moving to Launchpad rather than Google. If anyone's got any opinions then please let me know through the comments.