As subtle as a flying brick.

Latest

A boy named Sue and a girl named Marijuana Pepsi

By high school, her name was cool to many. “They were like, ‘Oh
yeah. Man, I wish I had your name. I love that. I’m going to name my
kid after you.’ I hear that so much and I go, Lord, please don’t do
that to that child.” —
Marijuana Pepsi Jackson

Canadian Members of Parliament voting records (finally) online

After a push from the NDP, the Canadian government’s put voting records of every Canadian MP online.
4c0eeb844946b2b04faf8a078fb0.jpeg

It’s about time, but what a lame execution: To view an MP’s record,
head to the website and click on the Members of Parliament link to find
your member of the House of Commons. Your MP’s site will will have a
tab for votes that takes you to a list showing whether they voted yea,
nea, or didn’t vote at all on any given bill.

It’s time for some civic-minded Canadian hackers to slurp out
all that data and reformat in a way that gives you real insight into
what your elected representative is up to and how she compares to all
the other politicos on the Hill.

Testing

refreshCountdown() ;
window.setInterval( ‘refreshCountdown()’, 1000 ) ;

Giving WordPress Its Own Directory

 

Many people want WordPress to power their site’s root (e.g.http://example.com) but they don’t want all of the WordPress files cluttering up their root directory. WordPress allows you to install it into a subdirectory, but have your blog exist in the site root.

WARNING: Multisite Users – Please Read

This process is not applicable to and does not work if you have enabled MultiSite.

Moving a Root install to its own directory

The process to move WordPress into its own directory is as follows:

  1. Create the new location for the core WordPress files to be stored (we will use /wordpress in our examples). (On linux, use mkdir wordpress from your www directory. You’ll probably want to use “chown apache:apache” on the wordpress directory you created.)
  2. Go to the General panel.
  3. In the box for WordPress address (URL): change the address to the new location of your main WordPress core files. Example:http://example.com/wordpress
  4. In the box for Site address (URL): change the address to the root directory’s URL. Example: http://example.com
  5. Click Save Changes. (Do not worry about the error message and do not try to see your blog at this point! You will probably get a message about file not found.)
  6. Move your WordPress core files to the new location (WordPress address).
  7. Copy (NOT MOVE!) the index.php and .htaccess files from the WordPress directory into the root directory of your site (Blog address). The .htaccess file is invisible, so you may have to set your FTP client to show hidden files. If you are not using pretty permalinks, then you may not have a .htaccess file. If you are running WordPress on a Windows (IIS) server and are using pretty permalinks, you’ll have a web.config rather than a .htaccess file in your WordPress directory. As stated above, copy (don’t move) the index.php file to your root directory, but MOVE (DON’T COPY) the web.config file to your root directory.
  8. Open your root directory’s index.php file in a text editor
  9. Change the following and save the file. Change the line that says:
    require('./wp-blog-header.php');
    to the following, using your directory name for the WordPress core files:
    require('./wordpress/wp-blog-header.php');
  10. Login to the new location. It might now be http://example.com/wordpress/wp-admin/
  11. If you have set up Permalinks, go to the Permalinks panel and update your Permalink structure. WordPress will automatically update your .htaccess file if it has the appropriate file permissions. If WordPress can’t write to your .htaccess file, it will display the new rewrite rules to you, which you should manually copy into your .htaccess file (in the same directory as the main index.php file.)

Using a pre-existing subdirectory install

If you already have WordPress installed in its own folder (i.e. http://example.com/wordpress) then the steps are as follows:

  1. Go to the General panel.
  2. In the box for Site address (URL): change the address to the root directory’s URL. Example: http://example.com
  3. Click Save Changes. (Do not worry about the error message and do not try to see your blog at this point! You will probably get a message about file not found.)
  4. Copy (NOT MOVE!) the index.php and .htaccess files from the WordPress directory into the root directory of your site (Blog address). The .htaccess file is invisible, so you may have to set your FTP client to show hidden files. If you are not using pretty permalinks, then you may not have a .htaccess file. If you are running WordPress on a Windows (IIS) server and are using pretty permalinks, you’ll have a web.config rather than a .htaccess file in your WordPress directory. As stated above, copy (don’t move) the index.php file to your root directory, but MOVE (DON’T COPY) the web.config file to your root directory.
  5. Open your root directory’s index.php file in a text editor
  6. Change the following and save the file. Change the line that says:
    require('./wp-blog-header.php');
    to the following, using your directory name for the WordPress core files:
    require('./wordpress/wp-blog-header.php');
  7. Login to your site. It should still be http://example.com/wordpress/wp-admin/
  8. If you have set up Permalinks, go to the Permalinks panel and update your Permalink structure. WordPress will automatically update your .htaccess file if it has the appropriate file permissions. If WordPress can’t write to your .htaccess file, it will display the new rewrite rules to you, which you should manually copy into your .htaccess file (in the same directory as the main index.php file.)

Pointing your home site’s URL to a subdirectory

In some cases, you may have a WordPress site that changes significantly every year, such as with a conference website. If you want to install each year’s version of the site in a subdirectory, such as /2010, /2011, and /2012, but have the root domain (yoursite.com) automatically redirect to a particular subdirectory (usually the latest), follow this technique:

  1. Install WordPress in a subdirectory, such as /2012.
  2. In your root folder (not the subdirectory folder), download and open your .htaccess file.
  3. Add the following to your .htaccess file:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?YourDomain.com$
RewriteRule ^(/)?$ blog [L]
  1. In the above code, change the “YourDomain.com” value to your root domain.
  2. In the above code, change the “blog” value to the subdirectory.
  3. Save and upload the .htacess file back to your root directory.

Now when users to go your root domain (yoursite.com), it will automatically redirect to the subdirectory you specified. When you want to redirect to a new subdirectory, such as the conference site for next year, just update the .htaccess redirect code.

 

It’s the most important meal of the day!

Oh, but breakfast truly is the most important meal of the day. For a bit of background, Chris Kimball of Cook’s Illustrated can teach you the history of pioneer and Victorian breakfasts, which were centered around foods we still enjoy today. Donuts are a staple, as are breakfast cereals, themselves the subject of a fine and storied history. Bacon is a universe unto itself, as you surely already know.

And what about the waffle? Not just a taste senstation but namesake to one of America’s great culinary joys. And it’s versatile, too. Fried joy is yours with the equally versatile beignet, fried apples and, of course, the simple and elegant fried egg.

All this wonderful food, surely we must have equally wonderful drink! Coffee is a staple, as is breakfast tea. But you deny yourself some of life’s great pleasures if you stop short of alcoholic breakfast drinks: mimosas, Bloody Marys, Irish coffee, or this eponymous joy built upon vodka, peach schnapps and raspberry liqueur.

“No crime is so great as daring to excel.” — Winston Churchill

A little detective work traced the problem to default date format
conversions and floating-point format conversions in the very useful
Excel program package. The date conversions affect at least 30 gene
names; the floating-point conversions affect at least 2,000 if Riken
identifiers are included. These conversions are irreversible; the original gene names cannot be recovered.


Yet another reason not to use Excel as your “database”.