MindDump. Photos. And random ramblings.

Expandmenu Shrunk


  • Category Archives Remember This
  • Cook Me.

    This is on my list of things to cook. Soon. Posting it here so I have *no* excuse. Instructions from a friend:

     
    Visi: you should make the roast squash!
    Visi: chop them in half, scrap out the seeds, score it with a grid, rub butter in, coat in salt and pepper and roast
    Visi: put a lil bit of curry powder on near the end
    Kirrus: temperature?
    Visi: 180 I guess
    Visi: whatever temperature you want!
    Visi: takes a while but when you can shove a fork through it it’s done
    Visi: *easily


  • Go (wéiqí, igo, baduk, cờ vây) opening

    I’ve been playing Go a bit of late, and a friend was taught this about openings, during a review of a game on KGS. Posting it here mainly so I remember for the future! :)

    Teofrostus [2k]: when you're playing go, there's a nice checklist that you should go through during the opening 
    Teofrostus [2k]: it goes something like this
    Teofrostus [2k]: 1) Do I have any weak groups?
    Teofrostus [2k]: 2) Does my opponent?
    Teofrostus [2k]: 3) Are there any unapproached corners? [opponent corners before allied corners]
    Teofrostus [2k]: 4) Are there any "big points" left?
    Teofrostus [2k]: and you should respond to these in this order

    Also worth noting:
    Teofrostus [2k]:it's something that you should follow until you're like 3d

  • MySQL Linux CLI command execution

    As another aid to my memory, you can run mysql commands on the command line like this:

    mysql -u user -p[password] database -e "SELECT * FROM orders;".

     

    You can also send the mysql client commands on stdin:

    echo "SELECT * FROM orders" | mysql -u user -p[password] database

     

    Or read them in with a file redirection

    mysql -u user -p[password] database < /home/kirrus/orders.sql

    That last one is really handy for reading MySQL dumps back into MySQL.


  • MySQL GRANT syntax oddity, show views

    So that I don’t forget: Despite what the documentation says, being unclear (links always have an underscore over there, so it’s hard to tell difference between a linked underscore linked item, and one merely space-separated), you should grant ‘SHOW VIEW’, not ‘SHOW_VIEW’. Additionally, ‘SHOW VIEW’ really needs SELECT permissions as well.


  • Deleting lots of tiny files really really quickly

    This is the second half of that magento issue. Mainly, after having got a directory with millions of files in it, you can do one of two things.

    mv sessions sessions_full && mkdir sessions && chown www-data:www-data sessions
    rm -rfv sessions_full

    Or

    find /loc/of/sessions -ctime +1 -type f -exec rm -v {} \;

  • bind refuses to restart, debian squeeze

    After an upgrade, I’ve noticed a few times that bind has refused to restart or reload, saying:

    Stopping domain name service: namedrndc: connect failed: connection refused

    This seems to be a permissions bug in debian, quite a long lasting one. In order to cheat-fix it quickly, I do the following:

    chown bind:root /etc/bind/rndc.key
    chmod 660
    /etc/init.d/bind9 restart

    That seems to fix it well enough. I think it’s a problem in that bind starts as one user, but runs as another. It may be that 440 are all the perms that are necessary. The debian bug report is here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=169577


  • Magento Session Files

    Magento (the popular open-source online shop system) likes to store its PHP session files in ~/public_html/var/session/

    Most debian servers don’t have that in their cron job that deletes old session files.

    So, you probably want to set it to store it’s session files in the default location (/var/lib/php5) or alter your cron job (/etc/cron.d/php5)

    Fun!


  • Invalid method in request \x16\x03\x01

    So, ran into this one. Firefox is throwing this error, along with ‘SSL_ERROR_RX_RECORD_TOO_LONG’. Turns out, apache was serving plain HTTP on port 443, as it hadn’t been given a default SSL config.

    Other causes may be: Corrupted SSL cert (rare). Mis-configured proxy. Not adding “SSLEngine On” after configuring an SSL cert. But mostly, you’re trying to talk HTTPS to an HTTP serving webserver.

    `a2ensite default-ssl` (on debian) fixed it. Well, fixed in in that the default server now has a snake-oil self-signed cert, but, you know, fixed it. :)