Using Git for WordPress plugin development.

I haven't used Subversion in years, and while I have done a lot of WordPress plugins over the year for work, they were all private and we never shared them on the registry.

I prefer to use git. I knew it had a svn sub-command however I've never used it. I spent the better part of a day trying to figure out how to push to WordPress's Subversion from git.

I tried to follow several guides but I kept getting Unable to determine upstream SVN information from working tree history, I spent hours googling it, eventually I came to the conclusion I have to use a different branch.

I thought I'd share this. might save someone few hours of frustration.
Continue reading



Pasting in VIM from KDE’s clipboard

For some reason I couldn't find it anywhere, but the register for the KDE clipboard ( ctrl-c / ctrl-v) is + not *.

To paste from the KDE clipboard in insert mode : CTRL-R +, in normal mode : "+p.

To map it to ctrl-v : :imap <c-v> <c-r>+, this way you can just press ctrl-v in insert mode to paste the system clipboard.

To paste from the system selection (mouse middle button) in insert mode : CTRL-R * or in normal mode "*p .

To paste from the VIM buffer in insert mode : CTRL-R ".

To set the system clipboard as the default clipboard for vim (for yy,dd,cc,p) : :set clipboard=unnamedplus .

Also make sure to check :registers .


Change CPUFreq governor on all CPUs

While I love KDE, I still prefer to use command line for almost everything.

A simple bash function to set/list all governors (add it to ~/.bash_profile)



Using CMake + Mingw to Cross-Compile Windows Apps (Part 2)

this is deprecated and have been long replaced by the mingw-w64 packages.

As promised, here's the second part of the tutorial on how to use cmake to build Qt4/OpenSSL Apps for Windows using mingw on Linux.

Assumptions :

1. You already followed the tutorial on how to setup Qt4/OpenSSL using mingw.
2. You have cmake installed.
3. You have a working wine setup or a way to test the executables.
Continue reading


Crosscompile Mingw + OpenSSL + Qt4 for Windows on Linux

this is deprecated and have been long replaced by the mingw-w64 packages.

For the longest time I used Mingw + cmake on top of wine to cross compile my Qt4 apps for windows, then I was bored one day, tired of how slow it is to recompile qt4 on wine and decided to try to get it to work with a native gcc instead of the overhead with wine.
So here goes.

This was done on Gentoo Linux, please don't ask me how to do it on other distros.

Assumptions :

1. You know your way around the linux shell and have portage privileges.
2. You're not scared from compiling things by hand.
3. You already have Qt4 installed and it is the same version as the windows source we gonna build.
4. Your working path will be ~/win32.
5. You have a working wine setup.
Continue reading