Author: barce

  • OH HAI! Ads in UR RSS FEEDZ

    The NY Times now has ads in their RSS feeds. When did this happen? I’m off to research Pheedo who does the ads.

    OH HAI -- We'ze Ads
    OH HAI — We'ze Ads
  • Helping People Find Jobs

    At Codebelay we work with a number of recruiters who have helped secure jobs for a lot of our friends. Right now there are two recruiters who will loyally work for you in your corner.

    If you have expertise with Javascript, especially jquery, or SQL Server, or PHP, these are the folks to talk to.

  • 2008 Favorites

    These things were just my absolute favorite in 2008.

    • Github – Do you want to see nice graphs about your current coding project? Do you want to invite friends to code with you? As a consultant, there wasn’t a major client that I didn’t use Github for this year.
    • The iPhone 3G – Thank you, thank you, Michael Parekh for saying that it’s the computer of the future and that you shouldn’t be developing for the web without it in mind.
    • Grokking what Gearman is about.
    • The Blogger.com SxSW gloves schwag. Ya, it was warm and rainy when Blogger.com passed these out but it was so good in the fall and winter!
    • Katy Perry’s song “Hot N Cold

    Katy Perry on the Warped Tour

    What were your favorites of 2008?

  • Site Diversity FTW

    If it’s the thought that counts, think about how site diversification has helped out the Gawker Media and Nick Denton these past 6 months.

    This set of graphs says it all:

    Site Diversity FTW in the Gawker Network

    Happy Holidays!

  • Another Hackday Update: PHP unserialize doesn’t quite do it

    Wow, I had to use someone’s custom unserialize code because PHP’s unserialize doesn’t quite work multi-byte strings. 🙁 Time wasted: 3 hours.

    Here’s the function:

    function mb_unserialize($serial_str) {
    $out = preg_replace(‘!s:(\d+):”(.*?)”;!se’, ‘”s:”.strlen(“$2″).”:\”$2\”;”‘, $serial_str);
    return unserialize($out);
    }
  • Update on the WordPress Dev2Live Hackday

    I know the bare minimum of what has to change in a WordPress install. Code that gets me the tables, and shows me the serializeable data in WordPress’ option settings is done.

  • A WordPress Hackday

    Today, I’m going to explore looking for a solution for staging WordPress from a development environment to a production one. I’ll be posting throughout the day as “hacks” become available.

    The main issue is changing serialized dev data into production data.

    I’ll be in irc.freenode.net #wpdev2live .

  • Installing fcgi on IIS 6.0 with PHP 5.2.8

    Choose fcgi iis
    Choose IIS FastCGI
    Be sure to install extensions needed for WordPress
    Be sure to install extensions needed for WordPress

    Select these extensions:
    GD2
    Gettext
    Multi-Byte String
    Mimetypec
    MySQL
    MySQLi
    PDO/MySQL
    SQLite (in case MySQL fails)
    XML-RPC (WordPress needs this)

    Be sure to install Pear and the PHP Manual, too.

    Next step: Install FastCGI with the installer.

    For more info check out this page

    Also check out info how to install FastCGI on IIS 6.0.

    Install eAccelerator.

    My php.ini is below:

    [PHP]
    cgi.force_redirect=0
    extension_dir=”C:\Program Files\PHP\ext”
    [PHP_GD2]
    extension=php_gd2.dll
    [PHP_GETTEXT]
    extension=php_gettext.dll
    [PHP_MBSTRING]
    extension=php_mbstring.dll
    [PHP_MIME_MAGIC]
    extension=php_mime_magic.dll
    [PHP_MYSQL]
    extension=php_mysql.dll
    [PHP_MYSQLI]
    extension=php_mysqli.dll
    [PHP_PDO]
    extension=php_pdo.dll
    [PHP_PDO_MYSQL]
    extension=php_pdo_mysql.dll
    [PHP_SQLITE]
    extension=php_sqlite.dll
    [PHP_XMLRPC]
    extension=php_xmlrpc.dll

    ;eAccelerator
    extension=”eAccelerator.dll”
    eaccelerator.shm_size=”150″
    eaccelerator.cache_dir=”C:\cache”
    eaccelerator.enable=”1″
    eaccelerator.optimizer=”1″
    eaccelerator.check_mtime=”1″
    eaccelerator.debug=”0″
    eaccelerator.filter=””
    eaccelerator.shm_max=”0″
    eaccelerator.shm_ttl=”3600″
    eaccelerator.shm_prune_period=”1800″
    eaccelerator.shm_only=”1″
    eaccelerator.compress=”0″
    eaccelerator.compress_level=”9″
    eaccelerator.keys = “shm_only”
    eaccelerator.sessions = “shm_only”
    eaccelerator.content = “shm_only”

    My fcgiext.ini in %WINDOWS%/system32/inetsrv is below:

    [Types]
    php=C:\PROGRA~1\PHP\php-cgi.exe

    [C:\PROGRA~1\PHP\php-cgi.exe]
    QueueLength=999
    MaxInstances=20
    InstanceMaxRequests=500
    IdleTimeout=200
    RequestTimeout=60

    The performance you get on a 2GhZ processor with 1GiB of RAM is decent:

    Transactions:                     662 hits
    Availability:                 100.00 %
    Elapsed time:                 123.15 secs
    Data transferred:              21.96 MB
    Response time:                  8.29 secs
    Transaction rate:               5.38 trans/sec
    Throughput:                     0.18 MB/sec
    Concurrency:                   44.55
    Successful transactions:         662
    Failed transactions:               0
    Longest transaction:           13.25
    Shortest transaction:           4.23
    

    5.38 transactions per second is 464832 hits per day.

  • Apps That Seem to Crash WoW on OS X 10.5.5

    I wrote this quick script to take care of apps that seem to Crash OS X 10.5.5 on my Macbook Pro. I have just 1GiB of RAM instead of the recommended 2GiB, but ever since killing the processes in the script below, I haven’t had a crash.

    The bad guys are:

    • Google Updater
    • Cross Over
    • HPEventHandler
    • HP IO Classic Proxy
    • HP IO Classic Proxy 2

    I killed privoxy in my script below just to get more memory to run Warcraft.

    #!/bin/bash

    C1=`ps ax | grep Cross | grep -v grep | cut -c3-6`
    echo “C1: $C1”
    kill -9 $C1
    C1=`ps ax | grep “Google Updater” | grep -v grep | cut -c3-6`
    echo “C1: $C1”
    kill -9 $C1
    C1=`ps ax | grep “HPEventHandler” | grep -v grep | cut -c3-6`
    echo “C1: $C1”
    kill -9 $C1
    C1=`ps ax | grep “HP IO Classic Proxy 2” | grep -v grep | cut -c3-6`
    echo “C1: $C1”
    kill -9 $C1
    C1=`ps ax | grep “HP IO Classic Proxy \-” | grep -v grep | cut -c3-6`
    echo “C1: $C1”
    kill -9 $C1
    C1=`ps ax | grep “privoxy” | grep -v grep | cut -c3-6`
    echo “C1: $C1”
    kill -9 $C1