<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
xmlns:rawvoice="http://www.rawvoice.com/rawvoiceRssModule/"
><channel><title>Muddled Ramblings and Half-Baked Ideas &#187; geek</title> <atom:link href="http://muddledramblings.com/tag/geek/feed/" rel="self" type="application/rss+xml" /><link>http://muddledramblings.com</link> <description>A blog about a geek trying to make a living as a writer</description> <lastBuildDate>Fri, 03 Feb 2012 04:13:58 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator><itunes:summary>A blog about a geek trying to make a living as a writer</itunes:summary> <itunes:author>Jerry Seeger</itunes:author> <itunes:explicit>no</itunes:explicit> <itunes:image href="http://s3.amazonaws.com/muddlebucket/wp-content/uploads/iTunes/iTunes_img.jpg" /> <itunes:owner> <itunes:name>Jerry Seeger</itunes:name> <itunes:email>vikingjs+tunes@mac.com</itunes:email> </itunes:owner> <managingEditor>vikingjs+tunes@mac.com (Jerry Seeger)</managingEditor> <itunes:subtitle>A blog about a geek trying to make a living as a writer</itunes:subtitle> <itunes:keywords>short story, spoken</itunes:keywords> <image><title>Muddled Ramblings and Half-Baked Ideas &#187; geek</title> <url>http://muddledramblings.com/wp-content/plugins/powerpress/rss_default.jpg</url><link>http://muddledramblings.com</link> </image> <itunes:category text="Arts"> <itunes:category text="Literature" /> </itunes:category> <item><title>An Online Community that I can Get Behind</title><link>http://muddledramblings.com/rumblings-from-the-secret-labs/an-online-community-that-i-can-get-behind/</link> <comments>http://muddledramblings.com/rumblings-from-the-secret-labs/an-online-community-that-i-can-get-behind/#comments</comments> <pubDate>Thu, 02 Feb 2012 08:28:14 +0000</pubDate> <dc:creator>Jerry</dc:creator> <category><![CDATA[Rumblings from the Secret Labs]]></category> <category><![CDATA[geek]]></category> <category><![CDATA[Internet]]></category><guid
isPermaLink="false">http://muddledramblings.com/?p=10920</guid> <description><![CDATA[Since there are others using my server now, I thought it would be a good idea to upgrade my backup practices. I looked around a bit, hoping for a solution that was free, butt-simple to set up, and automatic, so I would never have to think about it again. I don&#8217;t like thinking when I [...]]]></description> <content:encoded><![CDATA[<p>Since there are others using my server now, I thought it would be a good idea to upgrade my backup practices. I looked around a bit, hoping for a solution that was free, butt-simple to set up, and automatic, so I would never have to think about it again. I don&#8217;t like thinking when I don&#8217;t have to.</p><p>I came across CrashPlan, the backup solution my employer uses. Turns out their software is free to chumps like me; they make their cash providing a place for you to put that valuable information.</p><p>There are two parts to any backup plan: you must gather your data together and you must put it somewhere safe that you can get to later. The CrashPlan software handles the gathering part, making it easy, for instance, to save all my stuff to the external hard drive sitting on my desk, but if the house burns down that won&#8217;t do me much good.</p><p>Happily CrashPlan also makes it easy to talk to remote computers, provided they have the software installed. I put CrashPlan on my server in a bunker somewhere in Nevada, and now this site and a couple of others are saved automatically to my drive in California as well. Easy peasy! Any computer signed up under my account can make backups to any other.</p><p>But wait! There&#8217;s more! The cool idea CrashPlan came up with was letting friends back each other up. I give you a special code and you can put backups of your stuff on my system. I can&#8217;t see what you saved, it&#8217;s all encrypted. But unless both our houses burn down at the same time, there&#8217;s always a safe copy.</p><p>Sure, if you pay you get more features and they will store your stuff in a safe place where you don&#8217;t have to wait if I happen to be on vacation, but for free that&#8217;s not bad at all. The idea of friends getting together and forming a backup community appeals to me as well. It&#8217;s a great way for geeks to look out for one another.</p> ]]></content:encoded> <wfw:commentRss>http://muddledramblings.com/rumblings-from-the-secret-labs/an-online-community-that-i-can-get-behind/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Step-by-Step LAMP server from scratch with MacPorts</title><link>http://muddledramblings.com/rumblings-from-the-secret-labs/lamp-server-from-scratch-with-macports/</link> <comments>http://muddledramblings.com/rumblings-from-the-secret-labs/lamp-server-from-scratch-with-macports/#comments</comments> <pubDate>Fri, 27 Jan 2012 02:39:13 +0000</pubDate> <dc:creator>Jerry</dc:creator> <category><![CDATA[Rumblings from the Secret Labs]]></category> <category><![CDATA[geek]]></category> <category><![CDATA[Internet]]></category><guid
isPermaLink="false">http://muddledramblings.com/?p=10823</guid> <description><![CDATA[A works-every-time guide to getting everything installed and configured.]]></description> <content:encoded><![CDATA[<p>Getting Apache, PHP, and MySQL installed and talking to each other is pretty simple — until something doesn&#8217;t come out right. This guide takes things one step at a time and checks each step along the way.</p><style type="text/css">
#page {
    width: 1170px;
}
#content.narrowcolumn {
    width: 790px;
}
.narrowcolumn .entry {
    line-height: inherit;
}
html > body .entry ul {
    text-indent: 0;
}
#tutorial .date-stamp {
    font-size: 80%;
    font-family: monospace;
}
#tutorial .date-stamp label {
    font-family: inherit;
}
	#tutorial p
	{
		margin-left: 4em;
	}
	#tutorial ol p
	{
		margin-left: 0;
	}
	#tutorial li {
		margin-top: 1em;
	}
	#tutorial ol ol li {
		list-style-type: upper-alpha;
	}
	#tutorial ol ol ol li {
		list-style-type: lower-roman;
	}
	#tutorial ol.code
	{
		list-style-type:none;
		margin: 1em 0;
		width: 580px;
		padding: 0.5em;
		font-size:90%;
	}
	#tutorial ol.code li
	{
		list-style-type:none;
	}
	#tutorial ul ol.code
	{
		width: 500px;
	}
	#tutorial ol ul li
	{
		list-style-type: circle;
	}
	#tutorial .example {
		padding: 0.1em 0.5em;
	}
	#tutorial ol.command,
	#tutorial .example.command
	{
		color:lightgreen;
		background-color:black;
	}
	#tutorial ol.text,
	#tutorial .example.code
	{
		color:black;
		background-color:lightgray;
	}
	#tutorial code.command:before
	{
		content:"$";
		padding-right:1ex;
	}
	#tutorial code.command.mysql:before
	{
		content:"mysql>";
		padding-right:1ex;
	}
	#tutorial ol.code li,
	#tutorial ol.text li
	{
		margin: 0;
	}
	#tutorial pre
	{
		margin: 0;
	}
	#tutorial li.note {
		background-color: lightyellow;
		list-style-type: none;
		/*text-indent:-42px;*/
		padding: 0.5em;
	}
	#tutorial li.note li {
		background-color: lightyellow;
		text-indent: 0;
	}
	#tutorial li.note ol {
		list-style-type: decimal;
	}
	#tutorial li.note:before {
		content: "Note:";
		margin-left: -42px;
		padding-right: 8px;
	}
	#tutorial li.before,
	#tutorial li.after
	{
		list-style-type: none;
	}
	#tutorial .filesystem
	{
		color: brown;
	}
	#tutorial table,
	#tutorial td
	{
		border: 1px solid black;
		border-collapse: collapse;
		vertical-align: top;
	}
	#tutorial td { padding: 0.3em 1em; }
	
	#tutorial .milestone span
	{
		color: purple;
	}
	#tutorial .quote { quotes: "\201c" "\201d"}
	#tutorial .quote:before { content: open-quote; }
	#tutorial .quote:after { content: close-quote; }
	#tutorial .remove { color: red; }
	#tutorial .add { color: green; }
</style><div
id="tutorial"><div
class="date-stamp"><label>last updated:</label> January 14, 2011</div><div
class="date-stamp"><label>last executed:</label> January 14, 2011</div><p><h2>Using MacPorts to build a LAMP server from scratch</h2></p><h4>About this tutorial:</h4><p>There are other step-by-step guides out there, and some of them are pretty dang good. But I’ve never found one that I could go through and reach the promised land without a hitch. (Usually the hitches happen around MySQL.) Occasionally key points are glossed over, but I think mostly there are things that have changed, and the tutorials haven’t updated. Now however I’ve done this enough times that there are no hitches anymore for me. Since MacPorts occasionally changes things, I’ll put up at the top of this page the last time this recipe was last used exactly as written here.</p><p>This guide breaks things down into very small steps, but each step is simple. I include tests for each stage of the installation, so problems can be spotted while they're easy to trace. We get each piece working before moving on to the next. I spend a little time telling you what it is you accomplish with each step, because a little understanding can really help when it’s time to troubleshoot, and if things are slightly different you have a better chance of working through them.</p><p><strong>Audience:</strong> This guide is designed to be useful to people with only a passing familiarity with the terminal. More sophisticated techno-geeks may just want to go through the sequence of commands, and read the surrounding material only when something doesn't make sense to them. The goal: follow these steps and it will work every damn time.</p><p><strong>MacOS X versions:</strong> Tiger, Leopard, Snow Leopard, Lion. Maybe others, too. The beauty of this method is it doesn’t really matter which OS X version you have.</p><h4>The advantages of this approach</h4><p>There are multiple options for setting up a Mac running OS X to be a Web server. Many of the necessary tools are even built right in. Using the built-in stuff might be the way for you to go, but there are problems: It’s difficult to customize (Search on <span
class="quote">install apc Mac</span> and you’ll see what I mean), you don’t control the versions of the software you install, and when you upgrade MacOS versions things could change out from under you.</p><p>Also simple to set up is MAMP, which is great for developing but not so much for deployment. For simple Web development on your local machine, it’s hard to beat.</p><p>But when it comes right down to it, for a production server you want control and you want predictability. For that, it’s best to install all the parts yourself in a known, well-documented configuration, that runs close to the metal. That’s where MacPorts comes in. Suddenly installing stuff gets a lot easier, and there’s plenty of documentation.</p><p>Holy schnikies! A new timing exploit on OpenSSL! It may be months before Apple's release fixes it. I want it sooner!</p><h4>What you lose:</h4><p>If you’re running OS X Server (suddenly an affordable option), you get some slick remote management tools. You’ll be saying goodbye to them if you take this route. In fact, you’ll be saying goodbye to all your friendly windows and checkboxes.</p><p>Also, I have never, ever, succeeded in setting up a mail server, MacPorts or otherwise, and I’ve tried a few different ways (all on the same box, so problems left over from one may have torpedoed the next), and no one I've ever met, even sophisticated IT guys, likes this chore. If serving mail is a requirement, then OS X Server is probably worth the loss of control. Just don’t ever upgrade your server to the next major version. (<span
class="quote">Where’s MySQL!?! Ahhhhhh!</span> I hear frustrated sys admins shout.)</p><p>So, here we go!</p><h3>Document conventions</h3><p>There are commands you type, lines of code you put in files, and other code-like things. I've tried to make it all clear with text styles.</p><table><tbody><tr><td
style="width: 400px;"><code
class="example command">This is something you type into the terminal</code></td><td>Do <strong>not</strong> type the <code
class="example command"></code>; it's just to represent the prompt in your own terminal window. Once you've typed the text (or pasted it in from here), hit return.</td></tr><tr><td><code
class="example code">This is a line of code in a file.</code></td><td>Either you will be looking for a line like this, or adding a line like this.</td></tr><tr><td><span
class="filesystem">This is a reference to a file or a path.</td><td></td></tr></tbody></table><div
class="major-section"><h3>Prepare the Box</h3><ol><li>Turn off unneeded services on the server box. Open System Preferences and select <span
class="quote">Sharing</span>.<ul><li
style="margin:0">turn on remote login<li
style="margin:0">(optional) turn on Screen Sharing<li
style="margin:0">Turn off everything else - <em>especially</em> Web Sharing and File Sharing</li></ul></li><li>Install XCode. This provides tools that MacPorts uses to build the programs for your machine. You can get XCode for free from the app store. It’s a huge download. Note that after you download it, you have to run the installer. It may launch XCode when the install is done, but you can just Quit out of it.</li><li>Install MacPorts. You can download the installer from <a
href="http://www.MacPorts.org/install.php">http://www.MacPorts.org/install.php</a> (make sure you choose the .dmg that matches the version of MacOS you are running). Run the installer and get ready to start typing.</li><li>Now it’s time to make sure MacPorts itself is up-to-date. Open terminal and type<ol
class="code command"><li><code
class="command">sudo port selfupdate</code></li><li><code
class="prompt">password: &lt;enter your admin password&gt;</code></li></ol> MacPorts will contact the mother ship and update itself.</li><ul><li
class="note">If you're not familiar with <a
href="http://xkcd.com/149/"><code>sudo</code></a>, you will be soon. It gives you temporary permission to act as the root user for this machine. Every once in a while during this process you will need to type your admin password again.</li></ul><li>May as well get into the habit of updating the installed software while we’re at it. Type<ol
class="code command"><li><code
class="command">sudo port upgrade outdated</code></li></ol> and you will most likely see a message that looks like an error but really says that there was nothing to upgrade. No biggie.<ul><li
class="note">Make a habit of running these commands regularly. One of the reasons you're doing this whole thing is to make sure your server stays up-to-date. This is how you do it.</li></ul></li></ol></div><div
class="major-section"><h3>Install Apache</h3><ol><li>Now it’s time to get down to business. All the stuff we’ve installed so far is just setting up the tools to make the rest of the job easier. Let’s start with Apache!<ol
class="code command"><li><code
class="command">sudo port install apache2</code></li></ol><ul><li
class="note">This may take a little while. It’s actually downloading code and compiling a version of the server tailored to your system. First it figures out all the other little pieces Apache needs and makes sure they’re all installed correctly. Hop up and grab a sandwich, or, if you're really motivated, do something else productive while you wait.</li></ul></li><li>When the install is done, you will see a prompt to execute a command that will make Apache start up automatically when the computer is rebooted. Usually you will want to do this. The command has changed in the past, so be sure to check for the message in your terminal window. <strong>As of this writing</strong>, the command is:<ol
class="code command"><li><code
class="command">sudo port load Apache2</code></li></ol></li><li>Create an alias to the correct apachectl. apachectl is a utility that allows you to do things like restart Apache after you make changes. The thing is, the built-in Apache has its own apachectl. To avoid confusion, you can either type the full path to the new apachectl every time, or you can set up an alias. Aliases are commands you define. In this case you will define a new command that executes the proper apachectl.<ol><li>In your home directory (<span
class="filesystem">~/</span>) you will find a file called <span
class="filesystem">.profile</span> - if you didn’t have one before, MacPorts made one for you. Note the dot at the start. That makes the file invisible; Finder will not show it. In terminal you can see it by typing<ol
class="code command"><li><code
class="command">ls -a ~/</code></li></ol> You will get back a list of all the files in your home directory, including the <span
class="quote">hidden</span> ones that start with <span
class="quote">.</span>.</li><li>Edit <span
class="filesystem">~/.profile</span> and add the following line:<ol
class="code text"><li><code
class="console">alias apache2ctl='sudo /opt/local/apache2/bin/apachectl'</code></li></ol><ul><li
class="note">Edit <em>how</em>? See <a
href="#ap2">below</a> for a brief discussion about editing text files and dealing with file permissions.</li><li
class="note">~/.profile isn't the only place you can put the alias, but it works.</li></ul></li><li>You need to reload the profile info for it to take effect in this terminal session.<ol
class="code command"><li><code
class="command">source ~/.profile</code></li></ol></li><li>Now anywhere in the docs it says to use apachectl, just type apache2ctl instead, and you will be sure to be working on the correct server.</li></ol><li>Start Apache:<ol
class="code command"><li><code
class="command">apache2ctl start</code></li></ol> You might see a warning or two, probably a notification about the server's name. That's fine.</li><li>Test the Apache installation. At this point, you should be able to go to <a
href="http://127.0.0.1/">http://127.0.0.1/</a> and see a simple message: “It works!”</li><li
class="milestone"><span>MILESTONE</span> - Apache is up and running!</li></ol></div><div
class="major-section"><h3>Install PHP</h3><ol><li> Use MacPorts to build PHP 5:<ol
class="code command"><li><code
class="command">sudo port install php5 +pear</code></li></ol><ul><li
class="note">You could install the MySQL extensions to PHP now (<code>sudo port install php5-mysql</code>), but that will cause MySQL to be installed as well. It’s no biggie, but I like to make sure each piece is working before moving on to the next. It makes problem-solving a lot easier. So, let’s hold off on that.</li><li
class="note"><code>+pear</code> adds an industry-standard way to load other PHP addons later.</li></ul></li><li>Choose your php.ini file. There are a couple of different options that trade off security for convenience (error reporting and whatnot). As of this writing there is <span
class="filesystem">php.ini-development</span> (more debugging information, less secure) and <span
class="filesystem">php.ini-production</span>. Copy the one you want to use and name it <span
class="filesystem">php.ini</span>:<ol
class="code command" style="width: 620px;"><li><code
class="command">sudo cp /opt/local/etc/php5/php.ini-development /opt/local/etc/php5/php.ini</code></li></ol> You will be editing this file a little bit later, but mostly it’s just a bunch of settings you’ll never need to understand.</li><li>Test the PHP install<ol><li>On the command line, type<ol
class="code command"><li><code
class="command">php -i</code></li></ol></li><li>A bunch of information will dump out. Hooray!</li></ol></li><li>Now it’s time to get Apache and PHP talking to each other. Apache needs to know that PHP is there, and when to use it. There’s a lot of less-than-ideal advice out there about how to do this.<ol><li>httpd.conf is the heart of the Apache configuration. Mess this up, Apache won’t run. It’s important, therefore, that you MAKE A BACKUP (there’s actually a spare copy in the install, but you never rely on that, do you?)<ol
class="code command"><li><code
class="command">cd /opt/local/apache2/conf</code></li><li><code
class="command">sudo cp httpd.conf httpd.conf.backup</code></li></ol></li><li>First run a little utility installed with Apache that supposedly sets things up for you, but actually doesn’t do the whole job:<ol
class="code command"><li><code
class="command">cd /opt/local/apache2/modules</code></li><li><code
class="command">sudo /opt/local/apache2/bin/apxs -a -e -n "php5" libphp5.so</code></li></ol><li>The utility added the line in the Apache config file that tells it that the PHP module is available. It does <strong>not</strong> tell Apache when to use it. There is an extra little config file for that job, but it’s not loaded (as far as I can tell), and it’s not really right anyway. Let's take matters into our own hands.<ul><li
class="note"><em>It won't let me save!</em> See <a
href="#ap2">below</a> for a brief discussion about editing text files and dealing with permissions.</li></ul><li>Time to edit! Open <span
class="filesystem">/opt/local/apache2/conf/httpd.conf</span> with permission to edit it. We need to add three lines; one to tell it that PHP files are text files (not strictly necessary but let’s be rigorous here), and two lines to tell it what to do when it encounters a PHP file.<ol><li>Search for the phrase <span
class="quote">AddType</span> in the file. After the comments (lines that start with #) add:<ol
class="code text" style="width:450px;"><li><code>AddType text/html   .php</code></li></ol></li><li>Search for AddHandler (it’s just a few lines down) and add:<ol
class="code text" style="width:450px;"><li><code>AddHandler application/x-httpd-php         .php</code></li><li><code>AddHandler application/x-httpd-php-source  .phps</code></li></ol> The second of those is just to let you display PHP source code in a Web page without actually running it.</li><li>Finally, we need to tell Apache that index.php is every bit as good as index.html. Search in the config file for <span
class="quote">index.html</span> and you should fine a line that says <code>DirectoryIndex index.html</code>. Right after the html file put <span
class="quote">index.php</span>:<ul><li
class="before">Before:<ol
class="code text"><li><code>DirectoryIndex index.html</code></li></ol></li><li
class="after">After:<ol
class="code text"><li><code>DirectoryIndex index.html <span
class="add">index.php</span></code></li></ol></li></ul></li><li>(Optional) As long as we’re in here, let’s make one more change for improved security. Search for the line that specifies the default options for Apache and remove <span
class="quote">Indexes</span>:<ul><li
class="before">Before:<ol
class="code text"><li><code>Options <span
class="remove">Indexes</span> FollowSymLinks</code></li></ol></li><li
class="after">After:<ol
class="code text"><li><code>Options FollowSymLinks</code></li></ol></li></ul> This prevents outsiders from seeing a list of everything in a directory that has no index file.</li><li>Save the file.</li></ol></li><li>Check the init file syntax by typing<ol
class="code command"><li><code
class="command">/opt/local/apache2/bin/httpd -t</code></li></ol> You will probably get a warning about the server’s name again, but that’s OK, as long as you see the magical <code
class="out">Syntax OK</code> message. If there is an error, the file and line number should be listed.</li><li>Restart Apache:<ol
class="code command"><li><code
class="command">apache2ctl restart</code></li></ol></li></ol></li><li>Test whether PHP and Apache can be friends. We will modify the “It Works!” file to dump out a bunch of info about your PHP installation.<ol><li>Currently the default Apache directory is <span
class="filesystem">/opt/local/apache2/htdocs</span></li><li>Start by renaming <span
class="filesystem">index.html</span> to <span
class="filesystem">index.php</span>:<ol
class="code command"><li><code
class="command">cd /opt/local/apache2/htdocs</code></li><li><code
class="command">sudo mv index.html index.php</code></li></ol></li><li>Edit the file, and after the It Works! bit add a PHP call so the result looks like this:<ol
class="code text"><li><pre><code class="code">&lt;html></code></pre></li><li><pre><code class="code">    &lt;body></code></pre></li><li><pre><code class="code">        &lt;h1>It works!&lt;/h1></code></pre></li><li><pre><code class="code">        &lt;?php echo phpinfo(); ?></code></pre></li><li><pre><code class="code">    &lt;/body></code></pre></li><li><pre><code class="code">&lt;/html></code></pre></li></ol></li><li>Save the file</li><li>Go to <a
href="http://127.0.0.1">http://127.0.0.1</a> - you should see a huge dump of everything you wanted to know about your PHP but were afraid to ask.</li></ol></li><li
class="milestone"><span>MILESTONE</span> - Apache and PHP are installed and talking nice to each other.</li></ol></div><div
class="major-section"><h3>Install and configure MySQL</h3><ol><li>Use MacPorts to install MySQL database and server and start it automatically when the machine boots:<ol
class="code command"><li><code
class="command">sudo port install mysql5-server</code></li><li><code
class="command">sudo port load mysql5-server</code></li></ol></li><li>Now we get to the trickiest part of the whole operation. There's nothing here that's difficult, but I've spent hours going in circles before, and I'm here so you won't find yourself in that boat as well. MySQL requires some configuration before it can run at all, and it can be a huge bother figuring out what’s going on if it doesn’t work the first time. We start by running a little init script:<ol
class="code command"><li><code
class="command">sudo -u _mysql mysql_install_db5</code></li></ol></li><li> As with Apache, you can create a set of aliases to simplify working with MySQL. There are some commands you will run frequently; things get easier if you don’t have to type the full path to the command every time. Open up <span
class="filesystem">~/.profile</span> again and add the following three lines:<ol
class="code text"><li><code
class="code">alias mysqlstart='sudo /opt/local/share/mysql5/mysql/mysql.server start'</code></li><li><code
class="code">alias mysql='/opt/local/lib/mysql5/bin/mysql'</code></li><li><code
class="code">alias mysqladmin='/opt/local/lib/mysql5/bin/mysqladmin'</code></li></ol> When you're done, save and<ol
class="code command"><li><code
class="command">source ~/.profile</code></li></ol></li><li>Start MySQL server:<ol
class="code command"><li><code
class="command">mysqlstart</code></li></ol></li><li>Next we need to deal with making the database secure and setting the first all-important password. The most complete way to do this is running another utility that takes you through the decisions.<ol
class="code command"><li><code
class="command">/opt/local/lib/mysql5/bin/mysql_secure_installation</code></li></ol> The script offers to delete some test users and databases that in my experience are totally useless anyway. Take the advice offered and get rid of all that junk. <br
/> <strong>Remember the password you set for the root user!</strong><ul><li
class="note">You now have a MySQL account named <span
class="quote">root</span> which is not the same as the root user for the machine itself. When using sudo you will use the machine root password (as you have been all along), but when invoking mysql or mysqladmin you will enter the password for the database root account.</li></ul></li><li>As with PHP above, MySQL has example config files for you to choose from. The config file can be placed in a bunch of different places, and depending on where you put it, it will override settings in other config files. If you follow this install procedure, you don’t actually need to do anything with the config files; we’ll just be using the factory defaults. But things will work better down the road if you choose a config that roughly matches the way the database will be used.<ol><li>Find where the basedir is. As of this writing it’s <span
class="filesystem">/opt/local</span>, and that’s not likely to change anytime soon, but why take that for granted when we can find out for sure? Let's make a habit of finding facts when they're available instead of relying on recipes like this one.<ol
class="code command"><li><code
class="command">mysqladmin -u root -p variables</code></li><li><code
class="prompt">password: &lt;enter MySQL root user's password&gt;</code></li></ol> A bunch of info will spew across your screen. At this moment, there are two interesting nuggets: basedir and socket. Make a note of them for later.</li><li>Now it’s time to choose which example config file you want to start with. The examples are in <span
class="filesystem">/opt/local/share/mysql5/mysql/</span>, and each has a brief explanation at the top that says what circumstances it’s optimized for. You can read those, or just choose one based on the name. If you have no idea how big your database is going to be, medium sounds nice. You can always swap it out later.</li><ol
class="code command"><li><code
class="command">sudo cp /opt/local/share/mysql5/mysql/my-medium.cnf &lt;basedir&gt;/my.cnf</code></li></ol> Fill in &lt;basedir&gt; with the basedir you learned in the previous step.</li></ol></li><li>Test MySQL<ol><li>On the command line, type<ol
class="code command"><li><code
class="command">mysql -u root -p</code></li><li><code
class="prompt">password: &lt;enter MySQL root user's password&gt;</code></li></ol> and enter the MySQL root user password when prompted. No errors? Cool. We’re done here. Type<ol
class="code command"><li><code
class="command mysql">exit</code></li></ol> at the prompt.</li></ol></li><li
class="milestone"><span>MILESTONE</span> - MySQL server is running and happily talking to itself.</li></ol></div><div
class="major-section"><h3>Teach PHP where to find MySQL</h3><ol><li><p>The database is up and running; now we need to give PHP the info it needs to access it. There's a thing called a socket that the two use to talk to each other. Like a lot of things in UNIX the socket looks like a file.</p><p>The default MySQL location for the socket is in <span
class="filesystem">/tmp</span>, but MacPorts doesn’t play that way. There are a couple of reasons that <span
class="filesystem">/tmp</span> is not an ideal place for the socket anyway, so we’ll do things the MacPorts way and tell PHP that the socket is not at the default location. To do this we edit <span
class="filesystem">/opt/local/etc/php5/php.ini</span>.</p><p>There are three places where sockets are specified, and they all need to point to the correct place. Remember when you saved the socket variable from MySQL before? Copy that line and then search in your php.ini file for three places where is says <code>default_socket</code>:</p><ol
class="code text"><li><code
class="code">pdo_mysql.default_socket = &lt;paste here></code></li><li><code
class="code">.  .  .</code></li><li><code
class="code">mysql.default_socket = &lt;paste here></code></li><li><code
class="code">.  .  .</code></li><li><code
class="code">mysqli.default_socket = &lt;paste here></code></li></ol><p>In each case the <code>whatever =</code> part will already be in the ini file; you just need to find each line and paste in the correct path.</p></li><li>While we’re editing the file, you may want to <a
href="http://php.net/manual/en/datetime.configuration.php">set a default time zone</a>. This will alleviate hassles with date functions later.</li><li>Finally, we need to install the PHP module that provides PHP with the code to operate on MySQL databases.<ol
class="code command"><li><code
class="command">sudo port install php5-mysql</code></li></ol></li><li>Restart Apache:<ol
class="code command"><li><code
class="command">apache2ctl restart</code></li></ol></li><li>Test the connection.<ol><li>Typing<ol
class="code command"><li><code
class="command">php -i | grep -i 'mysql'</code></li></ol> Should get you a list of a few mysterious lines of stuff.</li><li>Second test: The whole bag of marbles. You ready for this?<br
/><ol><li>In the Apache’s document root (where the index.php file you made before lives), create a new file named testmysql.php</li><li>In the file, paste the following: <br
/><ol
class="code text" style="width:450px;"><li><pre><code class="code">&lt;?php</code></pre></li><li><pre><code class="code">$dbhost = 'localhost';</code></pre></li><li><pre><code class="code">$dbuser = 'root';</code></pre></li><li><pre><code class="code">$dbpass = 'MYSQL_ROOT_PASSWRD';</code></pre></li><li><pre><code class="code">$conn = mysql_connect($dbhost, $dbuser, $dbpass);</code></pre></li><li><pre><code class="code">if ($conn) {</code></pre></li><li><pre><code class="code">    echo 'CONNECT OK';</code></pre></li><li><pre><code class="code">} else {</code></pre></li><li><pre><code class="code">    die ('Error connecting to mysql');</code></pre></li><li><pre><code class="code">}</code></pre></li><li><pre><code class="code">$dbname = 'mysql';</code></pre></li><li><pre><code class="code">mysql_select_db($dbname);</code></pre></li></ol></li><li>Edit the file to replace MYSQL_ROOT_PASSWRD with the password you set for the root database user.</li><li>Save the file.</li></ol><li>In your browser, go to <a
href="http://127.0.0.1/testmysql.php">http://127.0.0.1/testmysql.php</a></li><li>You should see a message saying “Connection OK”</li></ol></li><li
class="milestone"><span>MILESTONE</span> - Apache, PHP, and MySQL are all working together. High-five yourself, bud! You are an IT God!</li></ol></div><div
class="major-section"><h3>Set up virtual hosts.</h3><p>Finally, we will set up virtual hosts. This allows your server to handle more than one domain name. Even if you don't think you need more than one domain, it's a safe bet that before long you'll be glad you took care of this ahead of time.</p><p>We will create a file that tells Apache how to decide which directory to use for what request. There is an example file already waiting for us, so it gets pretty easy.</p><ol><li>Tell Apache to use the vhosts file. To do this we make one last edit to httpd.conf. After this, all our tweaks will be in a separate file so we don’t have to risk accidentally messing something up in the master file.<ol><li>In <span
class="filesystem">/opt/local/apache2/config/httpd.conf</span>, find the line that says<ol
class="code text"><li><code
class="code">#Include conf/extra/httpd-vhosts.conf</code></li></ol> and remove the #.</li><li>The # told Apache to ignore the include command. Take a look at all those other files it doesn’t include by default. Some of them might come in handy someday...</li><li>Save the file and restart Apache</li><li>Test by going to your old friend <a
href="http://127.0.0.1">http://127.0.0.1</a></li><li>Forbidden! What the heck!?! Right now, that's actually OK. The vhosts file is pointing to a folder that doesn't exist and even if it did it would be off-limits. All we have to do is modify the vhosts file to point to a directory that actually does exist, and tell Apache it's OK to load files from there.</li></ol></li><li>Before going further, it's probably a good idea to figure out where you plan to put the files for your Web sites. I've taken to putting them in <span
class="filesystem">/opt/local/www/domain.com/public/</span> - not through any particular plan, but <span
class="filesystem">/opt/local/www</span> is the default location for phpMyAdmin and I just went with it. The <span
class="quote">public</span> part is so you can have other files associated with the site that are not reachable from the outside.</li><li>Set up the default host directory<ol><li>Open <span
class="filesystem">/opt/local/apache2/conf/extra/httpd-vhosts.conf</span> for editing.</li><li><p>You will see two example blocks for two different domains. Important to note that if Apache can’t match any of the domains listed, it will default to the first in the list. This may be an important consideration for thwarting mischief.</p><p>The examples provided in the file accomplish one of the two things we need to get done — they tell Apache what directory to use for each domain, but they do nothing to address what permissions Apache has in those directories. A lot of people put the permissions stuff in the main httpd.conf, but why not keep it all in one place and simplify maintenance while we reduce risk?</p><p>Here's an example:</p><ol
class="code text"><li><pre><code class="code">&lt;VirtualHost *:80></code></pre></li><li><pre><code class="code">    ServerAdmin you@your.email.com</code></pre></li><li><pre><code class="code">    DocumentRoot "/opt/local/www/mydomain.com/public"</code></pre></li><li><pre><code class="code">    ServerName mydomain.com</code></pre></li><li><pre><code class="code">    ServerAlias www.mydomain.com</code></pre></li><li><pre><code class="code">    ErrorLog "logs/mydomain.com-error_log"</code></pre></li><li><pre><code class="code">    CustomLog "logs/mydomain.com-access_log" common</code></pre></li><li><pre><code class="code">    &lt;Directory "/opt/local/www/mydomain.com/public"></code></pre></li><li><pre><code class="code">        Options FollowSymLinks</code></pre></li><li><pre><code class="code">        AllowOverride None</code></pre></li><li><pre><code class="code">        Order allow,deny</code></pre></li><li><pre><code class="code">        Allow from all</code></pre></li><li><pre><code class="code">    &lt;/Directory></code></pre></li><li><pre><code class="code">&lt;/VirtualHost></code></pre></li></ol><p>You can see where it sets what directory to go to, where it says to treat www.mydomain.com the same as mydomain.com, and then in the Directory block it sets permissions. The actual permissions instructions are pretty arcane. The most important thing to note is the line<ol
class="code text"><li><code
class="code">AllowOverride none</code></li></ol> <strong>This is not typical</strong>, but it's better, as long as you don't forget you did it.</p><p>Here's the skinny: A lot of web apps like WordPress and Drupal need to set special rules about how certain requests are handled. They use a file called .htaccess to set those rules. By setting <code>AllowOverride none</code> you're telling Apache to ignore those files. Instead, you can put those rules right in the &lt;Directory> blocks in your vhosts file. It saves Apache the trouble of searching for .htaccess files on every request, and it's a more difficult target for hackers. .htaccess is for people who don't control the server. You do control the server, so you can do better.</p><ol
class="note"><li
class="note">If others will be putting sites on the server and you don't want them fiddling with the config files, you can allow .htaccess to override specific parameters. Read up in the Apache docs to learn more.</li><li
class="note">If you are using SSL, you also need to set up a VirtualHost entry for port 443. That entry will also include the locations of the SSL certificates.</li></ol></li><li>Add further blocks that match the domains you will be hosting.</li><li>Restart Apache and test your setup. <a
href="http://127.0.0.1">http://127.0.0.1</a> should go to your default directory. Testing the domains is trickier if you don’t have any DNS entries set up for that server. I’ll write up a separate document about using /etc/hosts to create local domains for this sort of test.</li></ol></li><li
class="milestone"><span>MILESTONE</span> - You have done it. A fully operational LAMP environment on your Mac, suitable for professional Web hosting.</li></ol></div><div
class="major-section"><h3>(Optional) Install phpMyAdmin</h3><p>phpMyAdmin makes some database operations much easier. There have been security issues in the past, so you might reconsider on a production machine, but on a development server it can be a real time saver.</p><ol><li><ol
class="code command"><li><code
class="command">sudo port install phpMyAdmin</code></li></ol></li><li>Update your Virtual Hosts with the domain you want to use to access phpMyAdmin, which is by default at <span
class="filesystem">/opt/local/www/phpmyadmin/</span></li><li>test - log in as root.</li><li>Configure - configuring phpMyAdmin fills me with a rage hotter than a thousand suns. It just never goes smoothly for me, whether I use their helper scripts or hand-roll it while poring over the docs. Maybe if I do it a few more times I’ll be ready to write a cookie-cutter guide for that, too. In the meantime, you’re better off getting advice on that one elsewhere.</li></ol></div><div
class="major-section"><h3>Wrapping Up</h3><p>I hope this guide was useful to you. I'm he kind of guy who learns by doing, and I've made plenty of mistakes in the past getting this stuff working. Funny thing is, when it goes smoothly, you wonder what the big deal was. Hopefully you're wondering that now.</p><p>If you find errors in this guide, please let me know. Things change and move, and I'd like this page to change and move with them.</p><p><strong>Keep up to date:</strong> One of the big advantages of this install method is that updates to key software packages get to your server faster. <strong>Use that power.</strong> Run the update commands listed in step one regularly.<ol
class="note"><li
class="note">The script that tests the PHP-MySQL connection is based on one I found at <a
href="http://www.pinoytux.com/linux/tip-testing-your-phpmysql-connection">http://www.pinoytux.com/linux/tip-testing-your-phpmysql-connection</a></li></ol></div><div
class="major-section"><h3>Appendices</h3><h4>Appendix 1: A brief explanation of sudo</h4><p>In the UNIX world, access to every little thing is carefully controlled. There's only one user who can change anything they want, and that user is named root.</p><p>When you log in on a Mac, you're not root, and good thing, too. But as an administrator, you can temporarily assume the root role. You do this by preceding your command with <code>sudo</code>. (That's an oversimplification, and you will have earned another Geek Point when you understand why. In the meantime, just go with it. <code>sudo</code> gives you power.)</p><p>When you use sudo, you type your password and if the system recognizes you as an administrator it will let you be root for that command.</p><p>For convenience, you only have to type your password every five minutes, but you do need to repeat 'sudo' for each command.</p><p>Just remember, as root you can really mess things up.</p><a
name="ap2"><h4>Appendix 2: On editing text files and permissions</h4></a><p><span
class="quote">Jerry told me to edit the file,</span> you lament, <span
class="quote">but he didn't say <em>how</em>.</span> Kind of strange, considering the minute detail of the rest of the guide. The thing is, there's not one easy answer.</p><p>Let's start with the two kinds of text editors. There are editors like vim and pico that run right in terminal. They are powerful, really useful for editing files on a remote box, and if you know how to use them you're not reading this footnote. The other option is a windowed plain-text editor. TextEdit is <strong>NOT</strong> a plain-text editor. There are a lot of plain-text editors out there, and they all have their claims to fame. You can use any of them to edit these files.</p><p>Whoops! That brings us to the gotcha: <em>permissions</em>. In UNIX, who can change what is tightly controlled. Many of the files we need to edit are owned by root, the God of the Machine, so we need to get special permission to save our changes. Many of the plain-text editors out there will let you open the file, but when it comes time to save... they can't. You don't have permission.</p><p>Some editors handle this gracefully, however, and let you type your admin password and carry on. BBEdit and its (free) little brother TextWrangler give you a chance to type your password and save the file. I'm sure there are plenty of others that do as well.</p><p>BBEdit and TextWrangler also allow you to launch the editor from the command line, so where I say above <span
class="quote">edit ~/.profile</span>, you can actually type <code
class="example command">edit&nbsp;~/.profile</code> and if you have TextWrangler installed, it will fire right up and you'll have taken care of the permissions issue. (If you decided to pay for BBEdit, the command is <code
class="example command">bbedit&nbsp;~/.profile</code>.) I'm sure there are plenty of other editors that do that too.</p><p>I'm really not endorsing BBEdit and TextWragler here; they just happen to be the tools I picked up first. Over time I have become comfortable with their (let's call them) quirks. Alas, finding your text editing answer is up to you. If you're starting down this path, it's only a matter of time before you pick up rudimentary vim or pico skills; eventually you'll be using your phone to tweak files while you're on the road. It's pretty empowering. But is now the time to start learning that stuff? Maybe not. It's your call.</p></div></div> ]]></content:encoded> <wfw:commentRss>http://muddledramblings.com/rumblings-from-the-secret-labs/lamp-server-from-scratch-with-macports/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>A Visit From Steve</title><link>http://muddledramblings.com/the-working-life/a-visit-from-steve/</link> <comments>http://muddledramblings.com/the-working-life/a-visit-from-steve/#comments</comments> <pubDate>Sun, 01 Jan 2012 18:12:24 +0000</pubDate> <dc:creator>Jerry</dc:creator> <category><![CDATA[The Working LIfe]]></category> <category><![CDATA[geek]]></category><guid
isPermaLink="false">http://muddledramblings.com/?p=10735</guid> <description><![CDATA[Does this dream make my geek look big?]]></description> <content:encoded><![CDATA[<p>Steve Jobs came to visit me in a dream last night. He was a younger version with badly-bleached hair that turned out on the orange side. He was very animated as we discussed the best way to add advanced table features to Safari. Steve was as intense as people say he was when he was alive, and we got along great.</p> ]]></content:encoded> <wfw:commentRss>http://muddledramblings.com/the-working-life/a-visit-from-steve/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>How This Blog Works</title><link>http://muddledramblings.com/rumblings-from-the-secret-labs/how-this-blog-works/</link> <comments>http://muddledramblings.com/rumblings-from-the-secret-labs/how-this-blog-works/#comments</comments> <pubDate>Sat, 20 Aug 2011 21:43:58 +0000</pubDate> <dc:creator>Jerry</dc:creator> <category><![CDATA[Rumblings from the Secret Labs]]></category> <category><![CDATA[Amazon S3]]></category> <category><![CDATA[blog]]></category> <category><![CDATA[CloudFlare]]></category> <category><![CDATA[geek]]></category> <category><![CDATA[MacMiniColo]]></category> <category><![CDATA[W3 Total Cache]]></category> <category><![CDATA[WordPress]]></category><guid
isPermaLink="false">http://muddledramblings.com/?p=10164</guid> <description><![CDATA[Were it not for a couple of bad Web hosts, I might never have learned all this stuff.]]></description> <content:encoded><![CDATA[<p>Over the years, the technology behind this blog has gone from cave-dwelling stone-knives-and-bearskin static pages to cloud-city jet-packs-and-lightsaber dynamic yumminess. That transformation starts with WordPress but does not end there. Not by a long shot.</p><p>I started the Muddled Media Empire using a tool called iBlog, because it was free and worked with Apple&#8217;s hosting service, which I was already paying for. iBlog&#8217;s claim to fame was that it didn&#8217;t require a database &#8211; every time you made a change it went through and regenerated all pages that were affected. Toward the end, that was getting to be thousands of pages in some cases, each of which had to be uploaded individually. When iBlog&#8217;s support and development faltered, it was already past time for me to move on.</p><p>WordPress is an enormously popular Web-publishing platform. It comes in two flavors: you can host your blog on their super-duper servers and accept their terms of service and the slightly limited customization options, or you can install the code on your own server and go nuts. I chose the latter, mainly because I wanted to be able to touch the code. I&#8217;m a tinkerer.</p><p>So I signed up for a cheap Web host and set to work building what you see now. At first things were great, but after a while the host started having issues, and the once-great customer service withered up and vanished. So much for LiveRack. I think they just didn&#8217;t want to be in the hosting business anymore. I moved to iPage.</p><p>iPage was cheap, but I was crammed onto a server with a bunch of other people and sometimes my blog would take an agonizing time to load. Like, almost a minute. Then there was the time a very popular Geek site linked to my <a
href="http://muddledramblings.com/table-of-css3-border-radius-compliance">CSS <code>border-radius</code> table</a> and iPage shut me down because the demand on the server was too much. Ouch! My moment in the sun became my moment at the bottom of a well.</p><p>I set out to find ways to make this blog more server-friendly and more user-friendly at the same time. Step 1: caching. WordPress doesn&#8217;t store Web pages, it stores data and the instructions on how to build a Web page. So, every time you ask to load a page here, WordPress fires up a program that reads from the database and assembles all the parts to the page. The thing is, that takes longer than just finding the requested file and sending it back, the way iBlog did. Caching is a way for the server to say, &#8220;hey, wait a minute &#8211; I just did this page and nothing&#8217;s changed. I&#8217;ll just send the same thing I did last time.&#8221; That can lead to big savings, both in time and server load.</p><p>I looked at a few WordPress cacheing programs and eventually chose W3 Total Cache, because it does far more than just cache data. For instance, it will minify scripts and css files (remove extra spaces and crunch them down) and combine the files together so the browser only has to make one request. It will zip the data, meaning fewer 1&#8242;s and 0&#8242;s moving down the pipe, and it does a few other things as well, one of which I will get to shortly.</p><p>I installed <a
href="http://wordpress.org/extend/plugins/w3-total-cache/">W3 Total Cache</a>, and although some settings broke a couple of javascripts (for reasons I have yet to figure out &#8211; I&#8217;ll get to that someday), the features I could turn on definitely made a difference. Hooray!</p><p>But Muddled Ramblings and Half-Baked Ideas was still way too slow. I continued my search for ways to speed things up. I also began a search for a host that sucked less than iPage. (iPage was also starting to have outages that lasted a day or more. Not acceptable.) I decided I was willing to pay extra to be sure I wasn&#8217;t on an overwhelmed machine.</p><p>I&#8217;m not sure which came first &#8211; new server or <a
href="http://aws.amazon.com/s3/">Amazon Simple Storage Service</a>. S3 is a pretty basic concept &#8211; you put your stuff on their super-duper servers, and when people need it they will get it really quickly. Things that don&#8217;t change, like images and even some scripts, can live there and your server doesn&#8217;t have to worry about them.</p><p>This is where W3 Total Cache earned my donation to their cause. You see, you can sign up for Amazon S3, and then put your account info into the proper W3TC panel and Bob&#8217;s Your Uncle. W3TC goes through your site, finds images and whatnot, puts them in your S3 bucket, and automatically changes all the links in your Web pages to point to your bucket instead of your own server. (Sometimes I find I have to copy the image to my S3 bucket manually, but that&#8217;s a small price to pay.)</p><p>Now a lot of the stuff on my blog, like the picture of me with the Utahraptors the other day, sits on a different, high-performance server out there somewhere, and no matter how overwhelmed my server happens to be at the moment those parts will arrive to you lickety-split. Amazon S3 is not free, however &#8211; each month I get an invoice for two or three cents. Should Muddled Ramblings suddenly become wildly popular, that number would increase.</p><p>About that server &#8211; the next stop on my quest for a good host was a place called Green Geeks. I wanted to upgrade to a VPS, which means I get a dedicated slice of a server that acted just like it was my very own machine. There is a lot to like about those, but my blog just wouldn&#8217;t run in the base level of RAM they offered. I upgraded and reorganized so that different requests would not take up more ram than they needed. Still, I had outages. Sometimes the server would just stop freeing up memory and eventually choke and die. Since it was a virtual server in a standard configuration, logic says it was caused by something I was doing, but all my efforts to figure it out were fruitless, and Green Geeks ran out of patience trying to help me figure it out.</p><p>The server software itself is Apache. At this point I considered using nginx (rhymes with &#8216;bingin&#8217; ex&#8217;) instead. It&#8217;s supposedly faster, lighter, and easier to configure. But, I already <em>know</em> Apache. I may move to nginx in the future, but it&#8217;s not urgent anymore.</p><p>During the GreenGeeks era I came across another service that improves the performance of Web sites while reducing the load on the servers. I recently <a
href="http://muddledramblings.com/rumblings-from-the-secret-labs/cloudflare-awesome/">wrote glowingly</a> about CloudFlare, but I will repeat myself a bit here for completeness. <a
href="http://www.cloudflare.com/">CloudFlare</a> is a service that has a network of servers all over the world, and they stand between you the viewer and my server. They stash bits of my site all around the world, and much of the time they will have a copy of what you need on hand, and won&#8217;t even need to trouble my server with a request. About half of all requests to muddledramblings.com are magically and speedily taken care of without troubling my server at all. They also block a couple thousand bogus requests to my server each day, so I don&#8217;t have to deal with them (or pay for the bandwidth). It&#8217;s sweet, and the base service is free.</p><p>Unfortunately, it was not enough to keep my GreenGeeks server from crashing. Once more I began a search for a new host. I found through word of mouth a place called <a
href="http://www.macminicolo.net/">macminicolo</a>. Apple employees get a discount, but I wasn&#8217;t an Apple employee yet. It was still a bargain. For what turned out to be the same monthly cost of sharing <em>part</em> of a machine at GreenGeeks, I get an entire server, all to myself, with plenty of RAM. I&#8217;ve set up several servers on Mac using MacPorts, and I knew just how to get things up and running well. It costs less than half what a co-located server costs anywhere else I have found (Mac, Windows, or Linux). (Co-location has up-front costs, but in the long term saves money.) So I have that going for me.</p><p>The only thing missing is that at GreenGeeks I had a fancy control panel that made it much simpler to share the machine with my friends. I do miss that, but I&#8217;m ready now to host friend and family sites at a very reasonable cost.</p><p>So there you have it! This is just your typical Apache/WordPress/W3 Total Cache/Amazon S3/CloudFlare site run off a Mac mini located somewhere in Nevada. Load times are less than 5% of what they were a year ago. Five percent! Conservatively. Typically it&#8217;s more like 1/50th of the load time. Traffic is up. Life is good.</p><p>Now I have no incentive at all to learn more about optimization.</p> ]]></content:encoded> <wfw:commentRss>http://muddledramblings.com/rumblings-from-the-secret-labs/how-this-blog-works/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Must be a Very Long Train</title><link>http://muddledramblings.com/observations/must-be-a-very-long-train/</link> <comments>http://muddledramblings.com/observations/must-be-a-very-long-train/#comments</comments> <pubDate>Sat, 14 May 2011 00:04:42 +0000</pubDate> <dc:creator>Jerry</dc:creator> <category><![CDATA[Observations]]></category> <category><![CDATA[geek]]></category> <category><![CDATA[suck]]></category> <category><![CDATA[travel]]></category><guid
isPermaLink="false">http://muddledramblings.com/?p=9839</guid> <description><![CDATA[Or maybe a quantum train?]]></description> <content:encoded><![CDATA[<p>I&#8217;m traveling to beautiful scenic Lawrence, Kansas this summer, and I thought I&#8217;d see if taking the train was an option. On the plus side, the Southwest Limited passes right through town; if I flew I&#8217;d have to arrange transport from Kansas City. On the minus side, traveling by rail in this country is pricey. Back on the plus side, a stop in Santa Fe for a few days is trivial &#8211; the train goes through Lamy.</p><p>As I perused my options I came upon this table:</p><p><img
src="http://muddlebucket.s3.amazonaws.com/wp-content/uploads/2011/05/Screen-shot-2011-05-12-at-5.20.58-PM.png" alt="The Southwest Chief" title="The Southwest Chief" width="469" height="550" class="aligncenter size-full wp-image-9840" /></p><p>Note that, depending on how I reach Los Angeles, the Southwest Chief departs at different times. The back end of the train catches up with the front end over the course of the journey; the arrival time is almost the same.</p><p>Sometimes a movie maker will see a shot in a film and have to ask, &#8220;how did they do that?&#8221; Most of the time, a question like that is a compliment. But here I am, a Web/database guy, asking, &#8220;how did they do that?&#8221; and it&#8217;s with a disbelieving shake of the head. Who on this planet would design a system that allowed such inconsistency? Trust me, it takes extra work to get system behavior like that.</p><p>Don&#8217;t tell the people signing my time sheets every week, but this stuff is <em>not that hard</em>.</p> ]]></content:encoded> <wfw:commentRss>http://muddledramblings.com/observations/must-be-a-very-long-train/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Securing Dropbox</title><link>http://muddledramblings.com/rumblings-from-the-secret-labs/securing-dropbox/</link> <comments>http://muddledramblings.com/rumblings-from-the-secret-labs/securing-dropbox/#comments</comments> <pubDate>Wed, 20 Apr 2011 23:22:07 +0000</pubDate> <dc:creator>Jerry</dc:creator> <category><![CDATA[Rumblings from the Secret Labs]]></category> <category><![CDATA[geek]]></category> <category><![CDATA[privacy]]></category><guid
isPermaLink="false">http://muddledramblings.com/?p=9752</guid> <description><![CDATA[As I mentioned recently, Dropbox is awesome. When using it, however, it&#8217;s important to think about security. Think of it this way: You&#8217;re on a cruise ship, and you have a priceless diamond tiara (don&#8217;t we all?). You know it&#8217;ll be much safer in the ship&#8217;s vault than in your cabin. The ship&#8217;s purser is [...]]]></description> <content:encoded><![CDATA[<p>As I mentioned recently, Dropbox is awesome. When using it, however, it&#8217;s important to think about security.</p><p>Think of it this way: You&#8217;re on a cruise ship, and you have a priceless diamond tiara (don&#8217;t we all?). You know it&#8217;ll be much safer in the ship&#8217;s vault than in your cabin. The ship&#8217;s purser is only too happy to watch over your valuables in their very strong safe. Now you can rest easy.</p><p>Except&#8230; there&#8217;s someone else who can open the vault. What if the government serves the purser with a warrant (or some other constitutionally-questionable writ) and takes your tiara? What if someone fools the purser into handing over your tiara? For most things, trusting the purser is fine, but that tiara is really something special. What you need, then, is a special box with a really strong lock. You give the purser the box and neither he nor anyone else can even see what&#8217;s inside, and you can make it a <em>really</em> strong box, so even if the purser hands over the keys to <em>his</em> vault, your stuff is still safe.</p><p>The same principle applies with Dropbox. It&#8217;s really convenient and pretty darn secure, but someone else is holding the keys. For most things, like my writing, no further security is necessary. Yet I have a few files that I don&#8217;t want to leave to someone else to protect, but I still want the convenience and data backup Dropbox provides. On my mac I&#8217;ve set up a very simple system that allows me to see my most secret files whenever I need to on any of my machines, but protects them from prying eyes. It&#8217;s actually pretty simple, and there&#8217;s almost certainly a direct analog on Windows.</p><p>The disk utility that comes with Macs can create an encrypted disk image using pretty dang strong encryption. If you put that image file in your dropbox, then any files you add to that virtual disk will encrypted and saved to your Dropbox when you unmount the disk. Here are the steps:</p><ol><li>Fire up Disk Utility (it&#8217;s in the Utilities folder).</li><li>Click New Image</li><li>Decisions, decisions&#8230;.<ul><li>name your new disk. If you name it &#8220;secret stuff&#8221; that will just make people curious.</li><li>Size: For reasons I&#8217;ll go into shortly, I&#8217;d advise not making this any bigger than you really need. If you&#8217;re protecting text files, it can be pretty small. The 100MB setting is probably more than enough for most people.</li><li>Format: Just use the default</li><li>Encryption: I say, what the heck. Go for the maximum unless you&#8217;ll be using a really old machine.</li><li>Partition: just use the default.</li><li>Image Format: sparse disk image &#8211; this will keep the size of the actual disk file down.</li></ul></li><li>Save. You will be asked for a password. You&#8217;ll not need to remember it, so make it good and strong, nothing like any password you&#8217;ve used anywhere else. Keep the &#8220;save in keychain&#8221; option selected. (If you need it later, you can find it with Keychain Access.) &#8211; <b>Remember: this is the secret that protects all your other secrets.</b></li><li>Voila! Put the disk image in your Dropbox folder. When you open the image file, a new hard drive will appear in finder. Anything you put on the drive will be added to the .dmg file you created.</li><li>&#8220;Eject&#8221; the drive on that machine and open the .dmg on any other machines you want to share the information. While you remember your crazy password, get it saved in the keychains of your various machines.</li></ol><p>A couple of notes:</p><ul><li>The .dmg file will only update when you &#8220;eject&#8221; the drive. So I advise you not keep it mounted most of the time. Open it, add/access the files inside, and close it again. If you open it on two machines at the same time, you will end up with two versions in your Dropbox folder.</li><li>I advised saving your password on your keychain, but remember that anyone who can access your computer can also access your secrets. That&#8217;s pretty much true whatever you do, but you might want to consider not putting the password on your laptop, for instance, if you think it might fall into the wrong hands.</li><li>Since your secret files are saved as a single blob of data, you won&#8217;t have automatic backups of individual files. If you need to recover one, you&#8217;ll have to find the right version of the image file.</li><li>Since your information is saved as a big ol&#8217; blob, if you make a huge .dmg file it will eat up space in your Dropbox and burn up unnecessary bandwidth each time your save.</li><li>It&#8217;s possible to set things up to protect individual files, but it&#8217;s complicated. Hopefully it won&#8217;t always be.</li><li><b>Important!</b> If you only store the password on one machine &#8211; <em>Save it somewhere else also!</em>. If you lose that password (if your hard drive crashes or your computer is stolen, for instance), you&#8217;re not getting into your strongbox. <em>Ever</em>. That was the whole point, after all.</li></ul> ]]></content:encoded> <wfw:commentRss>http://muddledramblings.com/rumblings-from-the-secret-labs/securing-dropbox/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>Excel 2011 for Mac, UNIX Time, and Visual Basic for Applications</title><link>http://muddledramblings.com/rumblings-from-the-secret-labs/excel-2011-for-mac-unix-time-and-visual-basic-for-applications/</link> <comments>http://muddledramblings.com/rumblings-from-the-secret-labs/excel-2011-for-mac-unix-time-and-visual-basic-for-applications/#comments</comments> <pubDate>Wed, 23 Mar 2011 21:51:10 +0000</pubDate> <dc:creator>Jerry</dc:creator> <category><![CDATA[Rumblings from the Secret Labs]]></category> <category><![CDATA[geek]]></category><guid
isPermaLink="false">http://muddledramblings.com/?p=9599</guid> <description><![CDATA[Because it wasn't quite complicated enough.]]></description> <content:encoded><![CDATA[<p
style="font-size:85%;"><b>Note to people looking for a formula:</b> Yes, the code is here (for Mac and Windows, even). I tend to go long-winded even in technical articles, but if you&#8217;re dealing with converting UNIX time to Excel time, the answers lie below. You can skip ahead or read my brilliant and entertaining *cough* analysis first.</p><p>Microsoft Excel uses a method to represent time that is both smart and frustrating. How do they manage this? They take a good engineering solution, then fiddle with it. First some background:</p><p>Long before Y2K people who knew what they were doing had already abandoned the practice of using strings of text to represent dates in a computer. Using strings like &#8220;3/10/2011&#8243; to represent a date has plenty of drawbacks, from cultural (is that March 10th or October 3rd?) to performance-related (sort 3/10/2011, 4/2/1902, 3/8/2012). Therefore long ago people who were smarter than I am came up with other ways to represent time. Happliy, time is nice and linear. All you really need is a number line. Remember them? A number line stretches from zero to infinity in both directions. To measure time all you need to do is decide on a zero point and then any point in the history of the universe can be represented by some number of time units from that instant.</p><p>My first exposure to a more rational way to measure time was in the old MacOS. I don&#8217;t remember anymore exactly when the zero point was, or even what the units chosen were. I do remember that the number gets too big for the computer to handle some time in 2014. Ancient Macs will have a problem then. I blame the Aztecs.</p><p>The UNIX boys count seconds from January 1, 1970 at 00:00. You get special Geek Cred if you went to a party to celebrate second 1234567890 of the Unix epoch. 32-bit computers that use the Unix epoch will break in 2038, when the number of seconds gets too big to fit in 32 bits. (Note also that you can only go <em>back</em> a finite distance before the negative number goes out of the range the processor can handle.</p><p>That&#8217;s all well and good, but I&#8217;m here to discuss Microsoft Excel today, and in particular Microsoft Excel for Mac. Excel counts in days, but allows fractional values. 12.5 represents noon twelve days after the zero point. I haven&#8217;t checked, but I think this system works for dates far, far into the future. So good on Microsoft for coming up with it. (As long as you don&#8217;t need dates before the zero time. As far as I can tell, Excel doesn&#8217;t handle them).</p><p>Of course, there are a couple of caveats. First: the historical oddity. In Excel, the day February 29, 1900 exists. Alas, there never was such a day. Microsoft included this error because they wanted to be compatible with Lotus, who simply messed up. To change it now would cause problems, because the zero point for the Microsoft time is January 1, 1900. Every date in every spreadsheet would suddenly be off by one. A thousand years from now we may still be calculating time based on the insertion of a bogus day.</p><p>Oh, except that Microsoft time doesn&#8217;t always start in 1900, and here&#8217;s where things start to get squirrely. If you&#8217;re using Excel for Mac, the default day zero is January 1, 1904. Except when it isn&#8217;t. More on that in a bit.</p><p>I descended into Excel recently to write a macro that does fancy formatting based on data I dump from a Web-based tracking tool I&#8217;m building. The dates in my data are based on the UNIX epoch, so I need to convert them. I dump the raw data into one sheet and then display it correctly converted and formatted on the main sheet that people actually look at. Here&#8217;s the code I use in a cell of the spreadsheet that needs to show a converted date:</p><div
class="wp_syntax"><div
class="code"><pre class="lotusformulas" style="font-family:monospace;">    =DATE<span style="color: #000000;">&#40;</span><span style="color: #FF00FF;">1970</span>,<span style="color: #FF00FF;">1</span>,<span style="color: #FF00FF;">1</span><span style="color: #000000;">&#41;</span>+import!Z3/<span style="color: #000000;">&#40;</span><span style="color: #FF00FF;">60</span>*<span style="color: #FF00FF;">60</span>*<span style="color: #FF00FF;">24</span><span style="color: #000000;">&#41;</span></pre></div></div><p>where the unix time is in cell Z3 of the &#8216;import&#8217; sheet. This divides the unix time by the number of seconds in a day, which gives me the number of days that have passed since the UNIX zero time. The formula then adds on the number of days from the spreadsheet zero to the UNIX zero time. (I could just say 86,400 instead of 60*60*24, but this way I can tell at a glance I&#8217;m dealing with days, and speed will not be an issue.) Happily, this formula will work on both Mac and Windows versions of Excel, because the DATE function will return the right value for the start of the unix epoch based on whichever version of Excel is running.</p><p>So, no problem, right?</p><p>Well&#8230; except. I also have some more fancy work to do that requires scripting. The good news: Mac Excel 2011 uses Visual Basic for Applications (VBA), which while imperfect is a zillion times better than AppleScript. So away I went, coding with a twinkle in my eye and a song in my heart. To convert dates, I naturally followed the same plan I did in the sheet&#8217;s cells: get the value for 1/1/1970, then add the unix epoch days.</p><p>And the dates came out different. Yep, when scripting, Excel always uses the Windows zero time, even when the spreadsheet in question uses the Mac zero time. Dates calculated in cells in the sheet are four years different than dates calculated using the same method in a script.</p><p>Aargh. Of course, once I realized what the problem was, it was not too difficult to work around it. I just lost some of the portability of my code, because now it has to be tweaked based on what the zero date of the spreadsheet is.</p><p>An aside here: If you&#8217;re here to resolve some date confusion in your own Mac spreadsheet, I strongly recommend you start by going to Preferences->Calculation->Workbook Options and uncheck the &#8220;use 1904 date&#8221; option. Unfortunately it will <strong>not</strong> recalculate the dates already entered in your sheets, so if that&#8217;s a problem then it&#8217;s too late for you, bucko. Read on.</p><p>Here&#8217;s some not-as-portable-as-it-could-be code. You need to choose one of the first two lines based on whether your sheet uses mac dates or windows dates:</p><div
class="wp_syntax"><div
class="code"><pre class="vb" style="font-family:monospace;"><span style="color: #008000;">'excelZeroDate = DateSerial(1904, 1, 1)              ' mac zero
</span>excelZeroDate = 0      <span style="color: #008000;">' DateSerial(1900, 1, 1)     ' windows zero
</span>unixZeroDate = DateDiff(<span style="color: #800000;">&quot;d&quot;</span>, excelZeroDate, DateSerial(1970, 1, 1))</pre></div></div><p>Then if I have a date in the &#8216;import&#8217; sheet to convert, I can write something like:</p><div
class="wp_syntax"><div
class="code"><pre class="vb" style="font-family:monospace;">startDate = DateAdd(<span style="color: #800000;">&quot;s&quot;</span>, Worksheets(<span style="color: #800000;">&quot;import&quot;</span>).Cells(dateRow, dateColumn), unixZeroDate)</pre></div></div><p>The nice part is that these functions handled converting seconds and days for me. Overall it&#8217;s not a bad system if you overlook the part where a single application gives two different answers to the same question.</p> ]]></content:encoded> <wfw:commentRss>http://muddledramblings.com/rumblings-from-the-secret-labs/excel-2011-for-mac-unix-time-and-visual-basic-for-applications/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Well, THAT Sucked</title><link>http://muddledramblings.com/rumblings-from-the-secret-labs/well-that-sucked/</link> <comments>http://muddledramblings.com/rumblings-from-the-secret-labs/well-that-sucked/#comments</comments> <pubDate>Sun, 21 Nov 2010 20:14:55 +0000</pubDate> <dc:creator>Jerry</dc:creator> <category><![CDATA[Rumblings from the Secret Labs]]></category> <category><![CDATA[geek]]></category> <category><![CDATA[iPage]]></category> <category><![CDATA[suck]]></category> <category><![CDATA[Web]]></category><guid
isPermaLink="false">http://muddledramblings.com/?p=9311</guid> <description><![CDATA[It's particularly frustrating when things go wrong and there's nothing you can do about it.]]></description> <content:encoded><![CDATA[<p>The last few days my Web host has been having a tough time. I don&#8217;t know the exact nature of the problem and I doubt I ever will, but this site has been broken. For a while it would not load at all, and then it was in &#8216;read-only mode&#8217;, Which meant that it was still performing terribly and I couldn&#8217;t even put up a notice that I knew things weren&#8217;t going well but the solution was out of my hands. Not a good situation when my credibility as a programmer is an important asset.</p><p>I couldn&#8217;t even make a backup.</p><p>Things seem to be getting back to normal (though they are not there yet &#8211; the site is still quite slow). There&#8217;s even a chance that I&#8217;m running on a brand-new server that is not being shared with as many other people. Or at least a brand-new server. Unfortunately, however, while I have come to appreciate iPage the company, which was very helpful and patient getting me up and running, iPage the <em>service</em> has not been so great.</p><p>I have vowed that the next move I make will be to a server that I control completely, so I can choose who shares it with me. I&#8217;m looking at Co-location deals now, though I might wimp out ant take the middle road. A VPS (virtual private server) gives me all the control of having my own machine, but in fact it&#8217;s an illusion &mdash; I still share physical hardware with an unknown number of others.</p> ]]></content:encoded> <wfw:commentRss>http://muddledramblings.com/rumblings-from-the-secret-labs/well-that-sucked/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>The Drupal Attitude</title><link>http://muddledramblings.com/rumblings-from-the-secret-labs/the-drupal-attitude/</link> <comments>http://muddledramblings.com/rumblings-from-the-secret-labs/the-drupal-attitude/#comments</comments> <pubDate>Sat, 13 Nov 2010 23:13:13 +0000</pubDate> <dc:creator>Jerry</dc:creator> <category><![CDATA[Rumblings from the Secret Labs]]></category> <category><![CDATA[Drupal]]></category> <category><![CDATA[geek]]></category> <category><![CDATA[suck]]></category> <category><![CDATA[Web]]></category><guid
isPermaLink="false">http://muddledramblings.com/?p=9294</guid> <description><![CDATA[Drupal's biggest problem is cultural.]]></description> <content:encoded><![CDATA[<p>I&#8217;ve been doing some geekery with Drupal lately. Drupal is a free, open-source server application that makes it easier to build really complex Web sites. It allows you to create complex data types and establish relationships and do fancy database stuff&#8230; <em>without actually touching the database</em>. That&#8217;s not too shabby. Drupal is rapidly becoming more popular, but there are a few things standing between Drupal and world domination. At the top of the list is the Drupal Attitude.</p><p>I will illustrate with an example. Things will get geeky for a while as I set the stage, then mellow out as I focus on the human interactions between various groups.</p><p>From a technical standpoint, Drupal&#8217;s biggest flaw is that it sucks when it comes to many-to-many relationships. Imagine I have a data type called &#8220;shirt&#8221; and another called &#8220;color&#8221;. It is very easy for me to set up &#8220;shirt&#8221; so that it can have several colors. So, when I look at a specific shirt in my database I can see that it has red and yellow in it. That&#8217;s all pretty straightforward.</p><p>The catch comes when I want a list of all shirts with yellow in them. If I had direct control over the database, many-to-many relationships like this are trivial and do not diminish the performance of the server. Drupal has no built-in way to get a list of all shirts with yellow in them.</p><p>But wait! Drupal is open source, and better yet has been built to be easy to extend by outside programers. Into this glaring hole in Drupal several folks have stepped forward with modules that solve the problem in a variety of different ways. Some of these methods are clever (one uses the indexes built by the search engine, for instance), but all have trade-offs and weaknesses.</p><p>So, you&#8217;re a Drupal developer, and you want a list of shirts with yellow in them. Which module do you use? Each module works differently, each requires some installation and fiddling to get working. Then there are the two modules <em>by the same guy</em> that are for similar but different purposes, yet the actual differences are not spelled out very clearly. What would help a lot would be some concrete examples of when to use which.</p><p>Now we&#8217;re getting closer to the Drupal Attitude. Remember as I rant about this that all the modules I&#8217;m evaluating are <em>free</em>, posted by geeks who wanted to contribute to make Drupal better. So, some slack-cutting is in order. BUT&#8230;</p><p>I had already spent more time than I had available trying to figure out which module to use, when I found a question posted by a guy asking &#8220;can I use this module for x&#8221;, where x was very similar to what I needed. &#8220;Aha!&#8221; thought I, &#8220;Now we&#8217;ll get a definitive answer!&#8221; Except that the response to the question was, &#8220;In this discussion (the article was about the differences between two modules) we want to focus on generalities, not specific applications. You should download both modules and fiddle with them for a few hours to determine which is right for you.&#8221; Or something like that. Notably <em>absent</em> from the answer was a pointer to where specific questions would be answered.</p><p>The guy who asked the question responded a bit harshly, pretty much saying, &#8220;Would it kill you to just answer my question? I don&#8217;t want to spend hours learning something you already know and could tell me in fifteen seconds.&#8221;</p><p>Well, this is just the sort of uppity user that the Drupal community loves to hate. Several people piled on in defense of the developer who had refused to answer the question. &#8220;He&#8217;s doing this for free, he&#8217;s helping the community, you should be grateful, blah, blah, blah.&#8221; None of them deigned to answer the original question either. There is a real, entrenched cadre in the Drupal community that says, &#8220;we learned things the hard way, and you should too.&#8221; Who needs documentation when you can read the source code?</p><p>Let&#8217;s step back for a moment and ask ourselves, &#8220;Why did the developer give this code back to the Drupal community?&#8221; The obvious answer, the one everyone talks about, is that he wants to make things easier for other Drupal users. That is a noble motivation and one I wholeheartedly support. He wants to be <em>useful</em>. Perhaps he just isn&#8217;t aware that a huge part of utility of software lies in the documentation. Perhaps he isn&#8217;t aware that a few choice examples of what his modules are meant to accomplish would have cost him an hour of his time and improved the acceptance of his work dramatically. He&#8217;s a coder, after all, not a marketer or a technical writer.</p><p>Even with all that, however, when someone, in the form of a question, <em>contributes to the documentation</em> by providing a specific example, he didn&#8217;t answer the question. No light came on that even if that was not the place for the question, then spending five minutes creating an FAQ would have <em>helped the community</em> far more than adding a new feature to his software. So an opportunity to spend just a few seconds and make his contribution to the community better went completely ignored. His supporters congratulated him for not capitulating to the demands of his potential users for more clarity.</p><p>Any of them could have stepped up and helped the newbie, probably in ten words or less, but none did. None of them <em>wanted</em> improved documentation. &#8220;We had to learn it the hard way, so you should too,&#8221; with a side order of &#8220;we make lots of money because we&#8217;ve figured all this stuff out.&#8221; Ladies and gentlemen, the Drupal Attitude.</p><p>If the guy posted his module but doesn&#8217;t seem interested in making it <em>useful</em>, then why did he post it? Well, he&#8217;s certainly getting lots of love from the people who figured out his work the hard way. They can all feel good about how smart they are.</p><p>And in the end, should I be thankful this guy shared his work with the rest of us? Actually, no. In my case, the presence of his modules ultimately had <em>negative</em> value. They cost me time, and never getting an answer about which was appropriate for my task, I went with a module developed by someone else.</p><p>So, Drupal contributors: If you don&#8217;t want to document your module, and you don&#8217;t want to answer straightforward questions from people who need to get a job done in limited time, <strong>don&#8217;t bother posting your fucking module at all.</strong> I don&#8217;t have time for endless fiddling and I sure as hell don&#8217;t have time for the Drupal Attitude.</p> ]]></content:encoded> <wfw:commentRss>http://muddledramblings.com/rumblings-from-the-secret-labs/the-drupal-attitude/feed/</wfw:commentRss> <slash:comments>9</slash:comments> </item> <item><title>Night of the Busy Brain</title><link>http://muddledramblings.com/observations/night-of-the-busy-brain/</link> <comments>http://muddledramblings.com/observations/night-of-the-busy-brain/#comments</comments> <pubDate>Thu, 11 Nov 2010 17:32:42 +0000</pubDate> <dc:creator>Jerry</dc:creator> <category><![CDATA[Observations]]></category> <category><![CDATA[geek]]></category> <category><![CDATA[random]]></category><guid
isPermaLink="false">http://muddledramblings.com/?p=9291</guid> <description><![CDATA[I couldn&#8217;t sleep last night. My brain just wouldn&#8217;t quiet down. Kept thinking of stuff. Sometimes those times are productive, however. Last night I thought of: Why my algebraic attempts to calculate the point on a sloped line where the two halves of the shape had the same area were turning out so complex How [...]]]></description> <content:encoded><![CDATA[<p>I couldn&#8217;t sleep last night. My brain just wouldn&#8217;t quiet down. Kept thinking of stuff. Sometimes those times are productive, however. Last night I thought of:</p><ul><li>Why my algebraic attempts to calculate the point on a sloped line where the two halves of the shape had the same area were turning out so complex</li><li>How to make money off PeoplePost (ten years too late).</li><li>What to call my next version of PeoplePost</li><li>One of the reasons Tomcat won&#8217;t run as a daemon on my machine</li><li>There was a WordPress thing, too. What was it?</li><li>Sometimes a weasel with a hammer&#8230; um&#8230; maybe that wasn&#8217;t so productive.</li></ul><p>Anyway, eventually I fell asleep. That was about two hours ago. I&#8217;m more convinced than ever that alarm clocks are the bane of our civilization.</p> ]]></content:encoded> <wfw:commentRss>http://muddledramblings.com/observations/night-of-the-busy-brain/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced (User agent is rejected)
Content Delivery Network via Amazon Web Services: S3: muddlebucket.s3.amazonaws.com

Served from: muddledramblings.com @ 2012-02-03 20:41:47 -->
