Matt Grayspacer

Archive for the ‘Uncategorized’ Category

  Older →

2153 6 Feb 2010

Winterfest 2010 Roundup

Yesterday evening I attended Winterfest 2010, the annual beer tasting event presented by the Minnesota Craft Brewer’s Guild. Brewers from around the region compete for the Snowshoe award, based on a secret ballot submitted by the crowd. This year’s Winterfest was at the Minnesota History Center in St. Paul.

I went along with several Clockwork friends. This was my first time at Winterfest—I normally stick to the Autumn Brew Review—but the result was the same: too many beers, too little time. I’m just glad I was able to hold on to my glass.

Read the rest of this entry »

0926 20 Jan 2010

Find-as-You-Type Search in Google Chrome

I’ve mostly given up Firefox for daily web browsing in favor of Google Chrome. Chrome is fast, stable, and just enough for what I do—however, it lacks built-in, find-as-you-type search. Luckily, there’s an extension you can use, if you install the developer version of Chrome.

(Whenever possible, I avoid using the mouse. Keyboard shortcuts are much faster and don’t require a physical context switch.)

Read the rest of this entry »

1812 19 Jan 2010

Feed Overflow

Today Dez informed me that his RSS reader was chock-full of my old posts. When I launched my new site, a technical difference between the old feed produced by my custom blog software (RSS 1.0) and the feed WordPress generates (RSS 2.0) caused all the posts in my feed to appear as new posts.

Sorry about that!

Read the rest of this entry »

1208 18 Jan 2010

New Site Launched

I have soft launched my new site, powered by WordPress.

Read the rest of this entry »

2032 6 Sep 2009

An Evening of Dark Fashion

Couture Noir, a dark fashion show, will be held September 23rd at the Varsity Theater. Should be an interesting evening of fashion, music, and burlesque. More details at Couture Noir’s website.

I helped produce the site on WordPress.

2309 3 May 2009

Actually care? I Tweet.

This town is nothing but a ghost town.

Allow me to waste your time, 140 characters at a time.

0009 23 Feb 2009

New Server

First post from a new web server; testing, 1, 2, 3.

2310 1 Feb 2009

New Space for Clockwork

spacer

Today was Clockwork move-in day at the new building. Tomorrow: we must resume work in the midst of move-in chaos (controlled admirably).

I must admit that I am excited and proud to be a part of this moment; it inspires me to keep working hard to keep it going.

1000 23 Dec 2008

Solving the Mystery of MySQL’s Open Files

On Friday, Clockwork’s sysadm and I were poking at MySQL server configurations. We ran out of available file handles after increasing table_cache, a symptom that the MySQL manual mentions explicitly.

Examining the system environment, ulimit -n reports 1024, yet we saw MySQL climb to its open_files_limit system variable: 2500. Hmmm.

I wrote a quick proof-of-concept C program (shown below) and experimented with the setrlimit call. I wanted to see how a program can raise its own process limits, since that must be what MySQL is doing. (There is a ulimit -n call in safe_mysqld that is not running in our setup; it must be systems that don’t support setrlimit?)

Findings:

  • MySQL raises its own process limits as root before it drops privileges to the mysql user
  • Process limits are enforced for root
  • Only root can increase process limits beyond existing settings

The following code will fail to increase its NOFILE limit when run as non-root, and increase the limit as root.

C p-of-c code

#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <sys/resource.h>

int main ( int argc, char **argv ) {

    int             i;
    FILE          * fps[4096];
    struct rlimit   nofile_lim;

    nofile_lim.rlim_cur  =  (rlim_t) 2048;
    nofile_lim.rlim_max  =  (rlim_t) 3072;

    if ( setrlimit( RLIMIT_NOFILE, &nofile_lim ) == -1 ) {
        perror( "Error setting limit\n" );
        return -1;
    }

    for ( i = 0; i < 4096; ++i ) {

        char filename[255];

        sprintf( filename, "tmp-%d", i );

        fps[i]  =  fopen( filename, "w" );

        if ( ! fps[i] ) {
            return -1;
        }

        if ( i % 100 ) {
            printf( "File #%d\n", i );
        }
    }

    return 0;
}
2118 14 Dec 2008

Why Facebook?

“Be careful what you denounce.” — Carrie

That’s what Carrie told me this evening, after I joined Facebook. Facebook is an online social phenomenon I’ve avoided up until now. Why did I finally “fold”, as one co-worker put it?

  1. Tons of people I know are on Facebook, especially at Clockwork.
  2. Facebook is fast becoming the social media platform of choice.
  3. I am a web applications developer and someone that appreciates web tech.
  4. Facebook Connect intrigues me; I want to explore ways to reduce online identity duplication.
  5. I was able to delete one more e-mail from my GTD Action folder.
  6. I should know how to program a VCR! Resisting new technology isn’t my style.

There’s no reason to be obstinate about Facebook any more. I may as well jump in, see what I can learn, have fun, and eat my share of humble pie. See you on the online.

  Older →


gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.