Category Archives: Posts

Sparkup

Sparkup is a great plugin for writing html in `Vim` and `Textmate`. You use a special syntax and hit `ctrl+e` and presto, HTML all over the place.

Get the code right here

EDIT:

I just noticed that sparkup wasnt modified for the last year or so. Another attempt on the same syntax is Zen Coding which you can get at http://code.google.com/p/zen-coding/

Ive got a Kindle!

Scott Pilgrim on the Kindle

Scott Pilgrim on the Kindle

I bought my self a Kindle. Mainly because I wanted to pickup reading more and also because i wanted a device i could read some of my comics on. Its a nifty little device with a bunch of great content. The Amazon Kindle book shop is a great place to shop. They even have a service that allows you to send content, and then they convert it to a format the Kindle reads.

If you want to play with the convertion your self you should give Calibre a try. It allows you to convert most formats into a format thats readable by the Kindle.

While the Kindle supports a lot of formats it doesnt support cbr/cbz and epub. It does support pdf but its a really poor experience. Its a real shame since most of my books are in pdf or epub. All my comics are in cbr/cbz which is just rar/zip files. Its possible to open up those and tweak the size with an image editor but pdf is a hole other story.

What ive found is that pdf’s default font size is way smaller than the Kindles default font. There for the font will be around 9 pt which isnt readable at all. What you can do is copy the text into a format like HTML and then convert that. It’ll give you better control of the font size.

Another great way of reading on the Kindle is by using something like Instapaper. If you use the service already you’ll be happy to know that they’ll let you insert your kindle email address and then send you a collection of the latest 5 bookmarks you’ve added. You can tell it to send you a file once a week or every day. Also the amount of content can be increased.

Thats all ive found for now. Cant wait to play with it even more!

IE and input fields

For some reason ie6 and ie7 will add padding to the sides of a submit input field. A really annoying thing when your trying to match a certain pattern in your layout.

Fixing it is easy though. Adding `overflow: visible;` to the inputs will fix it. Maybe you can even do an ie only style thing with the `*`

Git extras

If you, like me, hate deleting branches by doing `git push origin :branchname` and `git branch -D branchname to delete a branch. Try out git extras by visionmedia. Its a set of great extras for git that makes some of the more trivial tasks way easier.

You can download the source here `http://github.com/visionmedia/git-extras`
– or use brew to install it via `brew install git-extras`

John Cleese is a brilliant and awesome man!

Im personally a big fan of the GTD, inbox-zero, todo list, organizing the day kind of guy. If it was possible i would structure everything in that set of rules. A developer is a creative person and creativity isnt always just there. Pleasing that gene can be hard with deadlines and managers but its definitely something both people should look in to.

John Cleese has always been a funny man. I knew he was brilliant and wise but i never knew that he actually looked into things like how to trigger creativity. This is a must see if you love the hole GTD thing.

Adding prefix to tables with Zend_Db

I was working on my ZFPress project which is a clone of WordPress but in Zend Framework. And one of the features was to add a prefix to the tables. So i looked around but couldnt find any real solution to this. This is what i came up with.

What you would do is extending your tables with the abstract class and use them as you would normally. It’ll then automatically add your prefix from your app.ini if it exists.