I have been using CSS sprites a lot lately and wanted a tool to generate them automatically, so I wrote a simple python tool (using the python imaging library) to generate a single image (at the moment it just creates a simple horizontal merge of the images).
To use the tool just run the following command:
sprites-gen.py {output-file} {input-file1} {input-file2} ...
You can also set a fixed height (it will rescale every image to fit the height) using the "--fixed-height" argument and define the quality of the output image using the "--quality" argument.
You can get this tool at https://github.com/elentok/sprites-gen
Read more...CSS files tend to grow very long, and even if you split them to smaller files, they are still not very easy to navigate.
To make things simpler I'm using Vim's custom folding feature to fold the CSS code into sections:
I'm using WampServer 2.1 (with PHP 5.3.4) on Windows 7 64-bit.
This guide was made with the help of Itay Adler.
Read more...Every once in a while I get this annoying problem where I can't a access my windows shares from other computers on the network, and the only way to get it it to work again is to restart windows.
I recently found out that to avoid restarting windows all you need to do is restart the "Server" service:
services.msc
To force Mercurial to run your unit tests before each commit and not to allow committing unless the unit tests pass you can use the "precommit" hook.
In the repository root, edit the ".hg\hgrc" file and add the following lines:
[hooks]
precommit = path-to-tests-script
(e.g. "qtodotxt\test\runtests.py")
Read more...The rollback
command only removes the latest changeset, if you want to
remove/undo multiple changesets (and all of their descendants) from a repository
you can use the "strip" method that comes with the "Mq" extension:
The Mq extension is distributed with Mercurial so to enable it just edit ~/.hgrc (in windows: C:\Users\UserName.hgrc) and add the following lines:
[extensions]
mq=
If you use TortoiseHg, then you can just open the settings page, and in the Extensions section enable "mq".
Read more...Last month I started writing QTodoTxt, a PySide (Python Qt bindings) GUI for the todo.txt concept.
While using it for my own todo list I noticed several features that were missing (I intend to implement them all in due time), one of these features was auto-completion for projects and contexts when editing or creating a new task, something like this:
About five months ago I bought an HTC Desire smartphone (it came with stock Android 2.2), at first I was very impressed but as time went by I started noticing a lot of annoyances:
Hi everyone,
About a week ago I noticed the todotxt-touch android application which uses a simple text file to store tasks (see http://todotxt.com/) and uses Dropbox to synchronize the file between the mobile phone and other computers.
I liked the idea of using a simple text file, but I couldn't find a good editor for this format so I decided to write one. Since I use both Linux and Windows I decided to use PySide (LGPL Qt bindings for Python).
Read more...EDIT (February 11th 2012): I uploaded the scripts to github, I hope this way it will never go offline again :-)
EDIT (July 4th 2011): I updated the URL again (here and also added the version with highlighting for .NET keywords. If I have some time I'll try to port it to SD4.
I've been using SharpDevelop a lot in the past couple of weeks and I really like it, it's a hell of a lot lighter than Visual Studio and... it's open source!!
One of the things I was missing was a light-on-dark color scheme, so after a little digging I figured out how and here's what I got: