Upgrading Software

I can never resist. When a new version is available I have to have it. Upgrade to WordPress 3.3 was seamless. Devils is always in the details though. I’ll probably find a post or a plugin that doesn’t work the same way.

Oh well, I’m on the latest and greatest right?!

Posted in Software | Tagged , | Leave a comment

Rendering to a texture with iOS 5 texture cache api.

There are a couple examples of how to take image input, perhaps from the iPhone camera, or from your own image, fast map those image to an OpenGl texture, and then render them with an OpenGL shader. This post is for those of you who don’t necessarily want to render the image on the screen, but want to perform some OpenGL operations and then read the image back out. Luckily, the same API that allows you to map the images to textures, also allows you to read data back out from the textures without having to use glReadPixels(…) or some other method that takes a long time. Here’s how it’s done…

Continue reading

Posted in Programming | Tagged , , , , , | 60 Comments

How to fix that mistake commit you just pushed to your git repository

I’ve already written a time or two how you can use git rebase to change your commit history as you work. Handy handy.. I think everyone should know how to do that.

Next up.. what if you pushed a commit and realize it’s not so great. First of all, everyone discourages this of course. The encouraged way is to just make another commit that fixes what you want different. We all want to break that rule every now and then though. Here’s how…
Continue reading

Posted in Programming | Tagged , , , | Leave a comment

Changing server ip addresses

OK, so I changed my virtual server ip address in response to my host being allocated a new block of IPs. Anyhow, things seem to have gone ok. I changed DNS timeouts to short, waited, updated everything etc etc… Of course, it seems that there are always some DNS servers here and there that don’t quite play by the rules. That and I don’t directly control my secondary name server. Hopefully nobody experiences too much down time.

Posted in System Administration | Tagged , | Leave a comment

Git Rebasing Tips

So there you are, using git to store, track and share your code with a few others. Maybe many others. You make a change, someone else makes a change, one or the other of you pulls the others changes and BAM.. you get that merge commit. It really isn’t harmful of course, but it cleans up your repository a lot to get rid of them. So…

  1. When you pull, use –rebase.
    git pull --rebase
    

    There. It did it for you. All your commits go after the commits on the remote origin.

  2. You forgot to do that. No prob…
    git pull # oh man.. I forgot.. merge commit
    git rebase origin/master # There.  Pretty easy isn't it.
    

So of course, you might have the same issue if you were working on a branch. You check out master, make some commits, go back to your branch, make some more, etc. It works the same way.

# on your branch
git rebase master

There. You can pull in the master branch changes but put all your branch changes after so you don’t have to have the merge commit again.

So you wrote that branch, changed master, and then you merge your branch back to master and get a merge commit again. In this case there isn’t a ref to rebase off of so intuitively like remote/origin or master. No prob, just use gitk or git log or whatever to find out what the sha1 of the old master was before you made your merge.

git rebase 

There. No merge commit again.

Now, there are a bunch of more advanced things rebase can do. You can use it to edit commits that weren’t quite right. You can also change the order of commits, edit the commit message, drop commits completely, and other cool things. You can do it all interactively too…

git rebase -i  # fun for all!

I leave you to study that part on your own.

Posted in Software | Tagged , , , | Leave a comment

Fixed my RSS feeds

I hadn’t realized I was a victim of the wp blank line bug in my RSS feeds. I found an extra space at the bottom of my wp-config.php file. Fixed. Perhaps that’ll help the rss readers out there.

Posted in Miscellaneous | Tagged , , | Leave a comment