Sometimes you just gotta stop and have a bump…

Note to self: get into this phabricator command line fu.

VISUAL_STUDIO_R.I.P._1989-2014

Visual Studio started CLOSING on me as I was editing due to my apparent change in status at some far-flung location for which I have no control. If Microsoft thinks that’s a feature I want in my primary development tool… well, all I have to say is, never again will I rely on it. Eclipse is a decent IDE and I’ll be converting my muscle memory to its ways after a couple decades of baking Visual Studio into my hands. It may be painful but it is also long overdue.

  1. Install Eclipse
    1. I went for the PHP version (“PDT”) since it seemed to have a few bells and whistles (eg git)
    2. The C++ support in Eclipse is called “CDT” and  you can install it by adding this “Work with” repo: http://download.eclipse.org/tools/cdt/releases/kepler
    3. I installed “CDT Main Features”, plus optional Memory View Enhancements, Misc Utils, Multicore Visualizer, Qt support, (ironically) Visual C++ support, and Visualizer Framework.  Not sure about these, time will tell.
  2. Configure Eclipse
    1. The biggest startup challenge is setting up key shortcuts.  The default ones are pretty stupid if you’ve used Microsoft products.  The main thing to remember is that you have to search for existing shortcut keys and manually remove them before you can add a new one, otherwise you will just get conflicts and nothing will work.  This sucks shit but not too bad once you realize what is going on.
    2. Set UTF-8 encoding:
      Windows > Preferences > General > Content Types, set UTF-8 as the default encoding for all content types.
      Windows > Preferences > General > Workspace, set "Text file encoding" to "Other : UTF-8".
  3. Set up projects
    1. Open C++ perspective
    2. Right-click project pane, New…, Blank Makefile, Other toolchain, use existing codebase location for workspace
    3. Search…, Working set, Choose, New, Resource, Name = codebase, click on existing codebase location, OK

More to come as I work with it. I’m moving the notes to the wiki.

Hey all you bloggers and publishers. If, like me, you’ve been putting off updating your blogs and wikis to show up nicely on smartphones, fear not, there are DIRT SIMPLE FAST solutions available today to set up special skins for mobile browsers that are gorgeous. As of today, here are the instant solutions.

WordPress

  • Right inside your admin panel in WordPress, click on the Plugins button in the left pane.
  • Select Add New.
  • Punch in WPTouch and hit “Search Plugins”.
  • There it is, now install it!
  • That’s it. Seriously. You can play with the settings if you want (like changing the logo), but you don’t need to. Wow!

Mediawiki

  • This skin is the one you want, but it has a few issues.
  • Here is a corrected version, use it to take your chance for it to work “out of the box” 🙂 Download and untar it from within your [mediawiki/skins] folder. The changes I made are listed at the end of this post.
  • Now users can select the skin in their preferences, but we want automatic! Update your LocalSettings.php file to set $wgDefaultSkin as follows:
    if (preg_match("/iphone/i", $_SERVER['HTTP_USER_AGENT'])) {
        $wgDefaultSkin = 'wptouch';
    } elseif (preg_match("/android/i", $_SERVER['HTTP_USER_AGENT'])) {
        $wgDefaultSkin = 'wptouch';
    } elseif (preg_match("/webos/i", $_SERVER['HTTP_USER_AGENT'])) {
        $wgDefaultSkin = 'wptouch';
    } elseif (preg_match("/ipod/i", $_SERVER['HTTP_USER_AGENT'])) {
        $wgDefaultSkin = 'wptouch';
    } elseif (preg_match("/opera mini/i", $_SERVER['HTTP_USER_AGENT'])) {
        $wgDefaultSkin = 'wptouch';
    } else {
        $wgDefaultSkin = 'vector';
    }
  • Go enjoy it!

Easy and beautiful!

(continued…)

On my recent upgrade of php to 5.3, gentoo created a new slot so that people could run 5 and 5.3 in parallel. Gentoo is always giving you options (can you handle it? “ask yourself, do you feel lucky, punk?”). As usual, you must proceed with caution. And as usual, you will probably learn something along the way. This time around, the lesson is on php.ini defaults. (continued…)