robfelty.com


Improving my coding efficiency in vim

Posted in javascript, php

Quarter note = 04142016 robfelty
Treble clef 4/4 Time
I have been using Vim for most editing for about 12 years now. I think I tried it for the first time in about 2003, and quickly gave up. Then in 2004 my roommate at the time convinced me to give it another try, and I quickly got hooked. I wrote my dissertation completely in vim. I have been coding in vim since then. I frequently find myself accidentally typing hjkl in non-vim editors. I feel I am pretty efficient […] (Read more)

Random featured images in wordpress

Posted in php, sql, wordpress

Quarter note = 07292011 robfelty
Treble clef 4/4 Time
I’ve had random header images on the Fedibblety Family blog for quite some time. I originally implemented this by looking for images in a particular directory. However, I had to manually add pictures to this directory, which was a bit cumbersome. I started thinking, why not just select randomly from all the featured images I have for my posts? So I hacked up a quick function to do that. Here it is: function get_random_header_images() { global $wpdb; $featured_image_query = "select […] (Read more)

Site redesign

Posted in (x)html, bash, css, php, sql, wordpress

Quarter note = 12012010 robfelty
Treble clef 4/4 Time
I started my website in 2003. At the time it was hosted by the University of Michigan, where I was a graduate student. They gave all students some space for a personal website. It was really great, though it did come with some limitations, like no php or cgi allowed. I managed to kludge some server side includes and javascript together to get a fairly decent food website. I also had some other stuff on my site like some academic […] (Read more)

New WordPress plugin – Image Browser

Posted in photography, php, sql, wordpress

Quarter note = 08042010 robfelty
Treble clef 4/4 Time
Today I released my 8th wordpress plugin. This one is quite a bit different from all the other plugins I have written. A friend of mine was looking for a way to create a gallery on his family blog. “No problem!”, I told him, “there are lots of plugins for that”. But I then quickly realized that no plugins were available for what he was looking for. All of the other image gallery plugins for wordpress function by creating galleries […] (Read more)

Showing total number of replies in bbpress

Posted in php, sql

Quarter note = 04092010 robfelty
Treble clef 4/4 Time
For awhile now I have been wanting to show the total number of topics started and replies in a bbpress forum on the profile page. Today I finally figured out how. I like bbpress quite a bit, as it integrates very nicely into wordpress. The main downside of bbpress right now is that the documentation is still basically nonexistent. Maybe someday I will help out with it. Anyways, to get the total number of replies, simply use the following little […] (Read more)