WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT ID, COUNT( comment_ID ) AS ccount FROM wp_str8_posts LEFT JOIN wp_str8_comments ON ( comment_post_ID = ID AND comment_approved = '1') WHERE post_status = 'publish' AND ID IN (5422,5421,5420,5419,5418,5417,5416,5415,5414,5413) GROUP BY ID

STR8BLOGGIN

Secure browser sessions by proxying through SSH

May 8th, 2007
  1. Download Putty and Puttygen
  2. Run Puttygen
  3. Create a private key; save it somewhere on your harddrive. Don’t bother with encrypting/passwording it.
  4. Copy the public key (shown in the box) with Ctrl-C
  5. Login to the server you want to proxy through, as normal, with Putty
  6. Edit .ssh/authorized_keys - you may have to create the .ssh folder
  7. Paste your public key on one long line into the file and then log out of the server
  8. Load your Putty settings for the site
  9. On the left, go to Connection -> Data and enter your username where it says “Autologin Username”
  10. On the left, go to Connection -> SSH -> Auth, and select your private key
  11. On the left, go to Connection -> SSH -> Tunnels, type source port 1080 (or whatever you want), “dynamic” remote, and click “Add”
  12. Go back to the main settings panel and be sure to save your settings
  13. Doubleclick the settings; you should login automatically without a password
  14. Go into your Firefox and select localhost:1080 as the SOCKS proxy for all your connections.

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(comment_ID) FROM wp_str8_comments WHERE comment_post_ID = 5422 AND comment_approved = '1';

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(*) FROM wp_str8_comments WHERE comment_post_ID = '5422' AND comment_approved = '1'

No Comments »

Birds are smart

May 7th, 2007

The complex intellect of ravens has me rethinking my recent dietary changes to be more morality-compliant. I gave up red meat but kept chicken, and I’m starting to think I may have to axe the fowl entirely. Dohhh.

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(comment_ID) FROM wp_str8_comments WHERE comment_post_ID = 5421 AND comment_approved = '1';

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(*) FROM wp_str8_comments WHERE comment_post_ID = '5421' AND comment_approved = '1'

No Comments »

Goodbye, Digg

May 1st, 2007

I don’t need you selling your users to your sponsors over a few hex digits. Reddit has a better algorithm anyway.

Oh, and 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0.

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(comment_ID) FROM wp_str8_comments WHERE comment_post_ID = 5420 AND comment_approved = '1';

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(*) FROM wp_str8_comments WHERE comment_post_ID = '5420' AND comment_approved = '1'

No Comments »

FreeBSD users having trouble with pecl?

January 29th, 2007

For a while I’ve had sporadic problems with pecl (PHP’s binary module building tool, part of PEAR) not working properly. Usually the error was:

[root@host ~]# pecl install memcache
	
Fatal error: Call to undefined function preg_match() in /usr/local/share/pear/PEAR/Frontend/CLI.php on line 70

Yet, preg_match() would work from other scripts - it is part of pcre, which was installed.

The problem is this. pcre is included via extensions.ini. That’s why it usually works. However, pecl for some reason deliberately turns off .ini file inclusion (that includes extensions.ini) when it runs the php interpreter. I’m not sure what the objective was here but it’s a problem on FreeBSD’s shared library pcre.so.

The fix: edit the pecl script (usually /usr/local/bin/pecl) and remove the ‘-n’ from the command line arguments.

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(comment_ID) FROM wp_str8_comments WHERE comment_post_ID = 5419 AND comment_approved = '1';

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(*) FROM wp_str8_comments WHERE comment_post_ID = '5419' AND comment_approved = '1'

No Comments »

World’s Fastest Hummer H1

January 27th, 2007

Check out this Hummer running the quarter mile in 12.8 seconds:

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(comment_ID) FROM wp_str8_comments WHERE comment_post_ID = 5418 AND comment_approved = '1';

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(*) FROM wp_str8_comments WHERE comment_post_ID = '5418' AND comment_approved = '1'

No Comments »

The party’s at MiamiNights.com

January 9th, 2007

Dear disgusted former readers,

I recognize that obscure vector programming languages probably aren’t what you came here to read. Please proceed over to www.miaminights.com to proceed with the gossip and trashing.

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(comment_ID) FROM wp_str8_comments WHERE comment_post_ID = 5417 AND comment_approved = '1';

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(*) FROM wp_str8_comments WHERE comment_post_ID = '5417' AND comment_approved = '1'

No Comments »

Microsoft: Developers are pawns

January 9th, 2007

The truth comes out - Microsoft has never cared about the developers beyond using them as leverage in the battle for the platform. If anyone is surprised by this, they’ve been asleep for the past ten years.

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(comment_ID) FROM wp_str8_comments WHERE comment_post_ID = 5416 AND comment_approved = '1';

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(*) FROM wp_str8_comments WHERE comment_post_ID = '5416' AND comment_approved = '1'

No Comments »

Oh John Kerry, you wild douchebag

November 1st, 2006

God you fucking schmuck haven’t you ruined liberalism enough? Please, make an ecocar out of granola and ride that shit to Darfur or something because I am so, so tired of you. OUT OF MY FACE!

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(comment_ID) FROM wp_str8_comments WHERE comment_post_ID = 5415 AND comment_approved = '1';

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(*) FROM wp_str8_comments WHERE comment_post_ID = '5415' AND comment_approved = '1'

No Comments »

K notes

June 6th, 2006

K is a terse array-oriented programming language.

Download old, free interpreter here

Here’s an intro

My notes, so far. Note that “monadic” means the operator takes one argument (! 10); dyadic means it takes two (2 ! 10).

  • ~ monadically is NOT.
  • _ is the monadic trunc operator. _ 10 = 10, _ 10.9 = 10
  • ! is the dyadic mod operator. 100 ! 2 = 0, 101 ! 2 = 1
  • | (pipe) is the monadic array reverse operator. | 1 2 3 = 3 2 1
  • ? monadically is the array uniq operator.
    ? 1 2 3
    1 2 3
    ? 1 2 3 1
    1 2 3

  • @ is the dyadic array index operator.
    names: `tom `bob `frank
    names @ 0
    `tom
    names @ 1
    `bob
    names @ 2
    `frank

  • # monadically is the array length operator. # 1 2 3 = 3. This is in Mr. Shasha’s primer.
  • # dyadically is the array fill operator. 10 # 7 = 7 7 7 7 7 7 7 7 7 7
  • Precedence is right to left; stupid. #names % 2 is an error; (#names) % 2 returns 1.5 as you’d expect.
  • & monadically finds the indices of an array that match an expression.
    & names = `frank
    ,2
    & ~ names = `frank
    0 1

    FYI, ,2 means the same thing as PHP array(1); - an array with one element whose value is 2.

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(comment_ID) FROM wp_str8_comments WHERE comment_post_ID = 5414 AND comment_approved = '1';

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(*) FROM wp_str8_comments WHERE comment_post_ID = '5414' AND comment_approved = '1'

No Comments »

Amazing Javascript continuations library

May 30th, 2006

Ever wished you could do this in Javascript?

alert(”Hello!”);
sleep(30);
alert(”Done!”);

Now you can. Narrative Javascript takes your Javascript and transforms it into a gigantic switch{} statement, saving and restoring the program state as it goes so that it appears to be one function call to your program. Pretty smart.

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(comment_ID) FROM wp_str8_comments WHERE comment_post_ID = 5413 AND comment_approved = '1';

WordPress database error: [Can't open file: 'wp_str8_comments.MYI'. (errno: 145)]
SELECT COUNT(*) FROM wp_str8_comments WHERE comment_post_ID = '5413' AND comment_approved = '1'

No Comments »