<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">

    <title type="text">WikiLab Notes</title>
    <subtitle type="text">WikiLab Notes</subtitle>
    <link rel="alternate" type="text/html" href="http://davidseah.com/wikilab/" />
    <link rel="self" type="application/atom+xml" href="http://davidseah.com/wikilab/Special:Recentchanges_Atom" />
    <updated>2010-03-16T22:59:06Z</updated>
    <rights>Copyright (c) 2007, noreply@davidseah.com</rights>
    <generator uri="http://expressionengine.com/" version="1.6.8">ExpressionEngine</generator>
    <id>tag:davidseah.com,2010:03:16:wiki</id>


    <entry>
      <title>CSS Notes</title>
      <link rel="alternate" type="text/html" href="http://davidseah.com/wikilab/CSS-Notes/" />
      <id>tag:davidseah.com,2010:wiki:CSS Notes/89.794</id>
      <published>2010-03-16T22:59:06Z</published>
      <updated>2010-03-16T22:59:06Z</updated>
      <author>
            <name>Dave Seah</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        <p>I'm writing some notes on CSS so I can get a better conceptual grasp of it. Consider these raw notes for me to unstupidify myself with regards to HTML/CSS.</p>

<p>So far, Leslie Franke's <a href="http://davidseah.com/?URL=http%3A%2F%2Flesliefranke.com%2Ffiles%2Freference%2Fcsscheatsheet.html">CSS Cheat Sheet</a> is nice and compact. What I need, though, is something that's a little more best practice / philosophical. I'll use his cheat sheet as a jumping-off point.</p>

<h3>Finding a Philosophical Approach to CSS-based Web Design</h3>

<p>Hell if I know what the best way is. The CSS Box Model makes it more difficult to tweak the spacing and dimensions of nested box designs on the fly without forethought. Since CSS does not support constants either, which would have been incredibly useful, it means that creating a CSS-based layout is incredibly finicky compared to how a graphics programmer might have approached a flexible definition language. There must be some advantage</p>

<p>Some <strong>rules of thumb</strong> that I'm aware of:</p>

<ul>
<li><p>Avoid the use of extraneous block-level elements, and use DIVs sparingly.</p></li>
<li><p>Create a clear cascade of elements, which helps specificity of applying styles broadly and individually.</p></li>
<li><p>Separate content from presentation. Presentational elements can be handled through CSS styling. Content elements are inline. Master the use of selectors.</p></li>
<li><p>Use HTML in a semantic manner. That means content-oriented, not presentation oriented, which allows the chunks of text and imagery to be properly scoped within the conventions of paragraphs, headers, sidebars, and so on. Also applies to using names for styles and classes.</p></li>
<li><p>While searching for "justifying the CSS Box Model", found this neat link off Dave Shea's site: <a href="http://davidseah.com/?URL=http%3A%2F%2Fwww.mezzoblue.com%2Fcss%2Fcribsheet%2F">CSS Cribsheet</a>, which is a concise best practice checklist. Sweet.</p></li>
<li><p>Neat <a href="http://davidseah.com/?URL=http%3A%2F%2Fmeyerweb.com%2Feric%2Ftools%2Fcss%2Freset%2F">RESET code</a> from Eric Meyer</p></li>
<li><p>A bunch of <a href="http://davidseah.com/?URL=http%3A%2F%2Fwww.w3avenue.com%2F2009%2F04%2F29%2Fdefinitive-list-of-css-frameworks-pick-your-style%2F">css frameworks</a> to oggle!</p></li>
</ul>

<p>It occurs to me that one thing that I've overlooked is that HTML, despite me thinking it's a kind of static layout language, is still highly order-dependent when it comes to writing markup. The concept of "in the document flow" and "out of the document flow" figures in heavily; since HTML is designed to flow endlessly in a document of undetermined width, each HTML element is designed to stand alone, not together. So the reason the element dimensions do not contain margin and padding within width is because the content is considered atomic; spacing is really considered as an optional attribute. It still seems a bit dumb to me because it makes flowing content predictably an act in constant arithmetic. This leads to making mistakes in addition, which leads to lots of tedious arithmetic bugs in coding, which I think is something preferably contained and should not be propagated.</p>

<p>Anyway, a visual designer is interested in combining elements so they seem to fit together, but this is not the prime concern of HTML. CSS is what was developed to tweak the flow into something, so the art of CSS design is less defining bins and boxes with self-contained elements than it is about artfully squirting content into boxes and hoping it all fits together neatly. However, there are real-world problems with browsers not quite working the same way, so this creates a world of pain if you want your page to look right. It's sort of like playing COMPETITION TETRIS, with each weirdly-shaped HTML element coming down the stream, and you hoping that you placed your previous blocks in a way that doesn't SCREW ya.</p>

<p>Which is why I have avoided HTML and CSS for so long and stuck with Flash. I tend to do screen-based stuff anyway. But it's inevitable that I need to define one bulletproof subset of HTML/CSS for just getting my stuff out there and looking relatively decent.</p>

<h3>Rethinking the Flow</h3>

<p>So one of the major clashes with my design sense and CSS is that I think in terms of screens, boxes, overlaid infographics, animation, event chains, and rasterops on framebuffers. This is an old-school computer graphic mindset. Now that I think about it, my video game screen architecture is a little underdeveloped in terms of content management.</p>

<ul>
<li><p>The W3C <a href="http://davidseah.com/?URL=http%3A%2F%2Fwww.w3.org%2FTR%2FCSS2%2Fvisuren.html">Visual Formatting Model</a> is the source of all. It suffers from introducing the concepts in an isolated piece-meal fashion. This is part of the overall CSS2 specification, which I guess I should read.</p></li>
<li><p>Essentially there are two kinds of boxes. The block boxes are full-width and stack on top of each other. The inline boxes stack left-to-right, unless you mess with that ordering and width with CSS properties.</p></li>
<li><p>Boxes can contain other boxes, providing context.</p></li>
<li><p>There are also boxes that are created on-the-fly by other tags. They inherit their properties from parent containing boxes.</p></li>
</ul>

<p>Uncontrolled width is what screws up flow. Since width (and height) are sometimes not known until the element is fully rendered, this creates additional problems. So pre-calculating widths properly is important in defining tightly-controlled layouts. Also, the understanding of flow and out-of-flow elements is critical to create minimal CSS. There are also automatic calculations (e.g. 'auto') that help.</p>

<p>Width seems to be more constrained than height. The HTML doc is assumed to flow endlessly without length but with bounded width. This is important to know for attributes like <code>overflow</code>.</p>

<h3>Essential Flow and Block Controlling Attributes</h3>

<p>So what kind of properties do I care about in the layout?</p>

<ul>
<li><p><strong>Changing the type of box</strong> using <code>display</code> as <code>block</code> or <code>inline</code> or <code>none</code> to hide it.</p></li>
<li><p><strong>Setting dimensions</strong> using <code>width</code> and <code>height</code>, keeping in mind that <code>margin</code>, <code>border</code>, and <code>padding</code> <em>add</em> to it.</p>

<p>Boxes expand unless <code>width</code> is applied. If you use <code>height</code> then <code>overflow</code> becomes a consideration.</p></li>
<li><p><strong>Floats</strong> applied to an element will tell content <em>after</em> it to flow around it.  You can <code>float: left</code> or <code>right</code>. So order is important. And floats will pile up, as much as they can, relative to the containing box. Use <code>clear: left</code>, or <code>right</code> or <code>all</code> so the element will ignore it. <a href="http://davidseah.com/?URL=http%3A%2F%2Fwww.smashingmagazine.com%2F2007%2F05%2F01%2Fcss-float-theory-things-you-should-know%2F">Here's a pretty comprehensive article</a>.</p>

<p>The float properties can interact in weird ways. Need to know containing box, active floats before and after, and ensure width is set to predict it. Then there are the damn browser bugs...fortunately these seem to be diminishing with current browsers in use.</p></li>
<li><p><strong>Positioning</strong> via the <code>position: static</code>, <code>relative</code>, <code>absolute</code>, which sets the <a href="http://davidseah.com/?URL=http%3A%2F%2Fwww.barelyfitz.com%2Fscreencast%2Fhtml-training%2Fcss%2Fpositioning%2F">type of positioning</a> relative to document flow. Static is the normal behavior. Relative allows you to use <code>left</code>, <code>top</code>, <code>bottom</code>, <code>right</code> attributes to nudge it. However, this is more of an offset of the drawing code for that element; other elements are not shifted based on the position! Absolute is exactly where you want ON THE PAGE.</p>

<p>To use relative positioning inside a containing box, set <code>position: relative</code> on the containing box and then <code>position: absolute</code> on the inner box.</p></li>
<li><p><strong>Automatic values</strong> can be applied to <code>margin-left:auto</code> and <code>margin-right:auto</code>, which tells the browser to automatically calculate. Works only with width. Expressed usually as <code>margin: 0 auto</code></p></li>
</ul>

<h3>Then there are those relative values</h3>

<p>Can specify pixels as <code>px</code>, percentages as <code>%</code>, and ems as <code>em</code> suffixes. Percentages need to have a parent containing size to work. Ems are <a href="http://davidseah.com/?URL=http%3A%2F%2Fwww.bigbaer.com%2Fcss_tutorials%2Fcss_font_size.htm">relative to the <code>font-size</code> property or its parent</a> depending on use. So ems are useful for text-related matters, and pixels probably for more layout-related styling. % might be OK too for that too. Hmm.</p>

<h3>Cross-browser consistency</h3>

<p>One annoying thing about HTML and CSS is that the browsers themselves don't render entirely the same. Since HTML was invented primarily as a document description language, niceties such as consistent pixel rendering aren't important. And the original idea was that people could format their text in a way that was most convenient for their own viewing. CSS is the means by which to hack-on presentational control, but it's a fight between user advocates and designer control.</p>

<p>So the reality is that all the browsers start out with different default spacings, which Meyer's <a href="http://davidseah.com/?URL=http%3A%2F%2Fmeyerweb.com%2Feric%2Ftools%2Fcss%2Freset%2F">RESET code</a> handles. There are other reset css in use, such as Yahoo's <a href="http://davidseah.com/?URL=http%3A%2F%2Fdeveloper.yahoo.com%2Fyui%2Ffonts%2F">Font Reset</a>, which is part of Yahoo's <a href="http://davidseah.com/?URL=http%3A%2F%2Fdeveloper.yahoo.com%2Fyui%2F">YUI Library</a>.</p>

<p>Therefore, it's desirable to use this reset code to establish a nice baseline. I have my own preferred text styling, for example, so I can customize this code to conform to my expectations. An inspection of which elements are reset is instructive in knowing what the problem elements in the layout will be, and starting from a base will mean less finicking around later.</p>

<p>Note to self: that IE6 double-margin bug that apparently affects floated elements goes away <a href="http://www.positioniseverything.net/explorer/doubled-margin.html">when <code>display: inline</code> is added.</a> Hmm!</p>

<p>There's a few websites where this annoying stuff is all cataloged:</p>

<ul>
<li><a href="http://www.quirksmode.org/">quirksmode.org</a></li>
<li><a href="http://www.positioniseverything.net/">positioniseverything.net</a></li>
<li><a href="http://www.alistapart.com/">alistapart.com</a></li>
</ul>

<h3>Handling inline list heights</h3>

<p>When you inline list elements, you'd think you could adjust their padding at the top and bottom so the background effect you're applying will be the right height. Nope! <a href="http://davidseah.com/?URL=http%3A%2F%2Fwww.maxdesign.com.au%2Fpresentation%2Finline%2F">Certain properties are disabled for inline elements</a>. A solution suggested is to retain the block-level but just float them left.</p>

<p>Or set the line-height property and use background graphics for the highlighting...I'll have to try that next. Page 13 of Cederholm's "Web Standards Solutions"...</p>

<p>I'm becoming aware of some Internet Explorer 7 weirdnesses, like this <a href="http://davidseah.com/?URL=http%3A%2F%2Fwww.satzansatz.de%2Fcssd%2Fonhavinglayout.html">idea of hasLayout</a>, which is an rendering-specific flag that IE seems to set to trigger different behaviors, which is the indirect source of many IE7 rendering bugs. Pretty annoying.</p>

<p>I also am learning that I shouldn't work on CSS on my laptop, because I will go blind.</p>

<h3>Grid Systems</h3>

<p>Grid systems appeal to me. There are two aesthetic elements that come to mind when working with grids:</p>

<ul>
<li><p>Given a page width, one needs to divide it into equal chunks so you can lay things out nicely and evenly. With print it's easy to do, but on a bitmapped display you need to think in pixels. Nathan Smith's <a href="http://960.gs/">960gs</a> system is a nice introduction to this idea. In that article is a nice link to <a href="http://www.alistapart.com/articles/settingtypeontheweb">Setting Type on the Web</a>, which goes through the fun pixel-based calculations to get a nice vertical grid.</p></li>
<li><p>Once you have a grid system, one decides how much to let the columns breathe. This is kind of a whitespace-to-content-ratio decision. I tend to like compact groupings and whitespace that clarifies the boundaries between groups, but I don't have a layout principle. Maybe it's time to develop one.</p></li>
</ul>

<h3>The Glory of CSS Reset</h3>

<p>As I've been farting around more with HTML/CSS, I'm coming to see how DOCTYPE + RESET are two of the main things that you should do right away. There's a really nice <a href="http://perishablepress.com/press/2007/10/23/a-killer-collection-of-global-css-reset-styles/">comparison of CSS reset approaches</a> on Perishable Press, which itself has some beautiful web typography.</p>

<p>I've also read some arguments about whether CSS Reset code is good or bad practice. I like how the CSS Reset "fixes" browser inconsistencies in spacing, making it mandatory to rebuild them. Some argue that breaking down and then rebuilding spacing rules is wasteful of processing time and efficient coding. Some argue that it's lazy. Personally, I think it saves me time in an environment that is already notoriously awash in interpreted, weirdly-specified standards that shares little common sense with regards to the historical development of computer graphics systems. Complaining about resetting CSS is kind of like complaining about having a cup of water poured on you in a thunderstorm. But that's just what I think.</p>

<h3>Expanding Those DIVs</h3>

<p>For a while I have been belaboring under the assumption that the <code>overflow</code> property had something to do with the way block elements expanded. NOPE! This article on Devito Design <a href="http://divitodesign.com/css/css-how-to-use-overflow/">explains overflow and how to expand DIVs</a>. The basics: overflow controls when scrollbars appears. That's it. It doesn't have anything to do with whether a DIV gets bigger. You can see how this works in this post that shows <a href="http://www.quirksmode.org/css/overflow.html">examples of overflow</a>.</p>

<p>What I really want to do is have my DIVs expand to contain whatever content is in it. Seems like a reasonable request, right? The author on Devito Design says he spent hours researching this tip, and he is a good guy in my book for providing this solution (if it works...I'm about to try it):</p>

<pre><code>div 
    height: auto;
    overflow: visible;
</code></pre>

<p>This worked in one situation, but not another.</p>

<p>It's that weird issue where the containing DIV doesn't seem to want to contain any floating elements...annoying! It's explained, with a nice "history of the solution" approach, on Quirksmode in this article <a href="http://www.quirksmode.org/css/clearing.html">describing the collapsing float workaround for Internet Explorer</a>. And there's a good alternate description at CSS Tricks <a href="http://css-tricks.com/all-about-floats/">All About Floats</a>, which quick solutions that work around IE. It all sounds maddening to me. So I fixed my problem by applying the time-tested `&lt;div style="clear:both" &gt; which fixes the height calculation...I guess the browser rendered suspends or is unable to calculate heights while everything is floating.</p>

<h3>Pesky List Indentations</h3>

<p>After you do a big margin:0 padding:0 reset on the UL, OL, and LI, you've got to build 'em back up. For just the regular bulleted lists, <a href="http://meyerweb.com/eric/css/list-indent.html">Eric Meyer</a> notes that different browsers pad differently. The default behavior, with the bullets outside the left margin, is actually the <a href="http://www.markboulton.co.uk/journal/comments/five-simple-steps-to-better-typography-part-2">traditionally correct way</a> to do it. However, I prefer the indented margins myself...sorry. Anyway, here's the code I use (assume margins and padding are set to zero):</p>

<pre><code>    UL 
        margin-left: 2em; margin-bottom: 1em;
</code></pre>

<h3>Equal Height Columns</h3>

<p>I'd forgotten how to fix the "columns are equal height" dilemma. There are two sources of info that I find promising: Dan Cederholm's <a href="http://en.wikipedia.org/wiki/Faux_columns">Faux Columns</a> approach and this <a href="http://matthewjamestaylor.com/blog/equal-height-columns-cross-browser-css-no-hacks">pure CSS approach</a> by Matthew James Taylor. What's nice about both these writeups is that they identify the working principle pretty clearly.</p>

<p>Cederholm's approach is probably the easiest with my fixed-width layouts. Taylor's approach requires extra DIVs to contain the background. The basic premise is that a floated parent DIV will stretch to the height of its largest child. You can set the background color of the parent, then. To make columns, you wrap the parent with MORE floated parents (each which will be the same height), then nudge all the divs into place so they lay on top of each other using relative positioning. A little tricky to grasp, but once you work out the math it makes sense. Each containing parent DIV also needs to be 100% width, otherwise the stacking doesn't seem to happen correctly.</p>

<h3>Float Magic</h3>

<p>Many of these positioning tricks appear to be based on activating the <strong>float</strong> or <strong>position</strong> properties of DIVs. Then, attributes such as width and height come into play. There is probably some kind of logic behind this. In some cases, the float property makes containers behave more the way we'd expect them to work:</p>

<ul>
<li><p>A floated div contains in entirety everything that is inside of it. If it's not floated, the DIV does not contain everything and things are allowed to stick out of it. This article <a href="http://www.ejeliot.com/blog/59">has a concise rundown of techniques</a>.</p></li>
<li><p>On a similar note, a non-floated div that contains nothing but other divs is considered to have no content. That is why you stick a "br style=clear:both" just before the closing tag; this forces the div to have content, and then it has to stretch to contain the very bottom of any contained divs.</p></li>
<li><p>The "position:relative" property fixes some bugs with IE6-7 related to the overflow property. Snook has a quick <a href="http://snook.ca/archives/html_and_css/position_relative_overflow_ie/">note on this</a> Good to know.</p></li>
<li><p>Using the position property on a div also disables the margin/padding collapsing "feature", if you're wondering where your extra padding and spacing has disappeared to, or if you're seeing mysterious gaps between DIVs. Andy Buddy <a href="http://www.andybudd.com/archives/2003/11/no_margin_for_error/">explains this</a> clearly (no pun intended).</p></li>
<li><p>The trick of using an outer div with "position:relative" in conjunction with an inner div with "position:absolute" opens up all kinds of easy static layouts.</p></li>
<li><p>Width and height calculations with the box model are pretty damn essential. It's an annoying model, to be sure, but it's what you have to deal with.</p></li>
</ul>


      ]]></content>
    </entry>

    <entry>
      <title>Media Temple dv Configuration</title>
      <link rel="alternate" type="text/html" href="http://davidseah.com/wikilab/Media-Temple-dv-Configuration/" />
      <id>tag:davidseah.com,2010:wiki:Media Temple dv Configuration/77.793</id>
      <published>2010-03-14T18:54:10Z</published>
      <updated>2010-03-14T18:54:10Z</updated>
      <author>
            <name>Dave Seah</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        <p>These are the notes I've gathered regarding the maintenance of my (dv) base system, which was configured out-of-the-box rather inefficiently. Media Temple has since adopted some of my suggestions, so this tuning may no longer be necessary.</p>

<p><strong>These are older notes</strong> and don't necessarily cover the newest versions of Wordpress and Media Temple's (dv) offerings.</p>

<p>I'm no longer running WordPress on my (dv), but here are the notes I wrote when I was moving my old wordpress blog. The optimization notes are probably still useful. I'm currently running Expression Engine, if anyone is curious.</p>

<h2>Moving to Media Temple</h2>

<ul>
<li><a href="http://davidseah.com/blog/comments/wordpress-and-shared-hosting/">Wordpress and Shared Hosting</a> - the move from smaller to larger servers, explained.</li>
<li><a href="http://davidseah.com/blog/moving-wordpress-databases/">Moving Wordpress Databases</a> - to get around the export limitations for large blogs.</li>
<li><a href="http://davidseah.com/blog/moving-wordpress-part-ii-media-temple-ho/">Moving Wordpress to Media Temple</a> - the steps taken to move my wordpress blog</li>
</ul>

<h2>General Optimization</h2>

<ul>
<li><a href="http://davidseah.com/blog/comments/configuring-a-media-temple-dv-base-for-wordpress">Configuring a Media Temple (dv) Base for Wordpress</a></li>
<li><a href="http://davidseah.com/blog/comments/other-optimizations-for-the-media-temple-dv-base/">Other Optimizations for Media Temple (dv) Base</a></li>
</ul>

<h2>Troubleshooting</h2>

<ul>
<li><a href="http://davidseah.com/blog/comments/monitoring-my-media-temple-dv-base-memory-usage/">Monitoring Media Temple (dv) Memory Usage</a></li>
<li><a href="http://davidseah.com/blog/comments/separate-php-error-logs-for-multiple-domains-with-plesk/">Separate PHP Error Logs with Plesk on the Media Temple (dv)</a></li>
</ul>

<h1>Working Notes</h1>

<h2>Internal Dummy Connections?</h2>

<p>I was doing some internal server optimization, and noticed a lot of error messages in <code>/etc/httpd/logs/error_log</code> coming from localhost (127.0.0.1) trying to hit the root directory of httpdocs. That's totally weird, so I Googled it and came up with this <a href="http://vdachev.net/2007/02/01/apache-internal-dummy-connection/">explanatory post</a>. The solution to avoid errors was to create a dummy index file in the DocumentRoot. Apache still logs the access, though.</p>


      ]]></content>
    </entry>

    <entry>
      <title>MySQL Optimization Tips</title>
      <link rel="alternate" type="text/html" href="http://davidseah.com/wikilab/MySQL-Optimization-Tips/" />
      <id>tag:davidseah.com,2010:wiki:MySQL Optimization Tips/115.792</id>
      <published>2010-03-13T02:51:37Z</published>
      <updated>2010-03-13T02:51:37Z</updated>
      <author>
            <name>Dave Seah</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        <p>My original MySQL configuration was designed to run on a dedicated-virtual (dv) server with a guaranteed 256MB of RAM. Since that includes EVERYTHING, I had to make sure that the server would run other necessary processes without overflowing. A dv server technically can make use of other free RAM ("burst RAM"), but if none is available it will become very slow and unresponsive as running processes starve and fight each other. Hence, the favored way to optimize is to ensure that the entire system will run in available memory. With a 256MB server, that includes Apache and PHP scripts.  I allocated 64MB to MySQL (25% of my 256MB guaranteed allocation) and it's worked fine under heavy load when I've been Lifehacker'd or Dugg; it's just a little slower. However, I've noticed that for some more complex back-end database transactions, it's been very slow. I'd like to improve performance.</p>

<p>There are a couple of <strong>mysql optimization scripts</strong> available. I just downloaded the current version of <a href="http://blog.mysqltuner.com/">MySqlTuner</a>, and it reports some things I should do. Here's the output:</p>

<pre><code>MySQLTuner 1.0.1 - Major Hayden [major@mhtx.net]
Bug reports, feature requests, and downloads at http://mysqltuner.com/
Run with '--help' for additional options and output filtering

-------- General Statistics --------------------------------------------------
[--] Skipped version check for MySQLTuner script
[OK] Currently running supported MySQL version 5.0.45
[OK] Operating on 32-bit architecture with less than 2GB RAM

-------- Storage Engine Statistics -------------------------------------------
[--] Status: -Archive -BDB -Federated +InnoDB -ISAM -NDBCluster
[--] Data in MyISAM tables: 2G (Tables: 348)
[--] Data in InnoDB tables: 6M (Tables: 382)
[!!] Total fragmented tables: 43

-------- Performance Metrics -------------------------------------------------
[--] Up for: 132d 17h 56m 59s (132M q [11.572 qps], 6M conn, TX: 3B, RX: 2B)
[--] Reads / Writes: 75% / 25%
[--] Total buffers: 35.0M global + 2.7M per thread (100 max threads)
[OK] Maximum possible memory usage: 303.7M (17% of installed RAM)
[OK] Slow queries: 0% (594/132M)
[OK] Highest usage of available connections: 62% (62/100)
[OK] Key buffer size / total MyISAM indexes: 8.0M/191.8M
[OK] Key buffer hit rate: 98.3% (4B cached / 76M reads)
[OK] Query cache efficiency: 60.8% (62M cached / 103M selects)
[!!] Query cache prunes per day: 72678
[OK] Sorts requiring temporary tables: 1% (91K temp sorts / 7M sorts)
[!!] Joins performed without indexes: 35870
[OK] Temporary tables created on disk: 19% (1M on disk / 5M total)
[!!] Thread cache is disabled
[!!] Table cache hit rate: 0% (64 open / 837K opened)
[OK] Open file limit used: 12% (124/1K)
[OK] Table locks acquired immediately: 99% (77M immediate / 77M locks)
[!!] InnoDB data size / buffer pool: 6.4M/2.0M

-------- Recommendations -----------------------------------------------------
General recommendations:
    Run OPTIMIZE TABLE to defragment tables for better performance
    Enable the slow query log to troubleshoot bad queries
    Adjust your join queries to always utilize indexes
    Set thread_cache_size to 4 as a starting value
    Increase table_cache gradually to avoid file descriptor limits
Variables to adjust:
    query_cache_size (set more than 8M)
    join_buffer_size (set more than 128.0K, or always use indexes with joins)
    thread_cache_size (start at 4)
    table_cache (set more than 64)
    innodb_buffer_pool_size (set more than/equal 6M)
</code></pre>

<p>In the recommendations section, I can see that there are some settings that can clearly be optimized. I had actually optimized these on my old dv, but the settings didn't migrate over. So let's look at my <code>/etc/my.cnf</code> configuration file; I have these relevant values set:</p>

<pre><code>query-cache-type = 1
query-cache-size = 8M

set-variable = innodb_buffer_pool_size=2M
set-variable = innodb_additional_mem_pool_size=500K
set-variable = innodb_log_buffer_size=500K
set-variable = innodb_thread_concurrency=2
</code></pre>

<p>The <strong>query cache</strong> is a section of memory that is used to cache queries that always return the same data set. So, it's the sort of thing that is useful for simple read operations.</p>

<p>Here are the changed values...you'll see I bumped up the query-cache-size by a factor of 3!</p>

<pre><code>query-cache-size = 24M
set-variable = innodb_buffer_pool_size=8M
</code></pre>

<p>And here are values I added:</p>

<pre><code>set-variable = join_buffer_size=512K
set-variable = thread_cache_size=4
set-variable = table_cache=1024
</code></pre>

<p>Now I need to let this run for a bit and see if there's any improvement. Timestamp: 3/11/2010.</p>

<p>After running for about a day, I'm seeing an improvement, but I am still seeing a lot of Query Cache Prunes (45000 over a period of 16 hours). Otherwise, things look pretty good. There's a variable called <code>query_cache_limit</code> that sets the maximum size of a saved query. It defaults to 1MB. I'm thinking that most of the query results returned for a blog are text, certainly no more than 30K of text for even a long post, so 1MB seems way too high. I set it to 256K for now starting at 8:00PM, to see what kind of impact it has. My reasoning is that anything that returns a result greater than 256K is likely to be a pretty rare operation, and so it shouldn't be cached anyway. I can't even imagine what would return a dataset that large on my blog. I'm hosting a site for a friend, though, that uses Phorum; it uses the database to store files (ugh). The filesize limit on that is about 500K, so perhaps this will cut down on the problem. I should probably set it even lower, but we'll see if 256K helps. Currently, I'm seeing these values with a cache limit of 1M:</p>

<pre><code>[OK] Query cache efficiency: 60.7% (321K cached / 529K selects)
[!!] Query cache prunes per day: 45002
</code></pre>

<p>An interesting thing is that I'm actually seeing the prunes-per-day metric DROPPING already after setting the limit to 256K. Here are the values 15 minutes later:</p>

<pre><code>[OK] Query cache efficiency: 60.7% (324K cached / 533K selects)
[!!] Query cache prunes per day: 44503
</code></pre>

<p>After running for a couple of hours, the value stopped dropping. For the heck of it, I set the limit to a mere 64K at 9:50PM. Will check in again. I have noticed that the website does seem to be more responsive overall than even yesterday, when I first expanded the size of the cache from 8M to 24M.</p>


      ]]></content>
    </entry>

    <entry>
      <title>Freelance Gigs and Job Sites</title>
      <link rel="alternate" type="text/html" href="http://davidseah.com/wikilab/Freelance-Gigs-and-Job-Sites/" />
      <id>tag:davidseah.com,2010:wiki:Freelance Gigs and Job Sites/113.789</id>
      <published>2010-03-12T15:53:57Z</published>
      <updated>2010-03-12T15:53:57Z</updated>
      <author>
            <name>Dave Seah</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        <p>Making a list of employment resources!</p>

<h2>Job Search and Recruitment Sites</h2>

<ul>
<li><a href="http://careerbuilder.com">CareerBuilder.com</a> - Claims 1.9 millions jobs to search. </li>
<li><a href="http://monster.com">Monster.com</a> - That giant jobs site</li>
</ul>

<h2>Regional Job Sites</h2>

<ul>
<li><a href="http://nhjobs.com">NHJobs.com</a> - New Hampshire Jobs</li>
</ul>

<h2>Specialty Market Classifieds</h2>

<ul>
<li><a href="http://marketplace.sitepoint.com/">SitePoint Classifieds</a> - Sitepoint is a major web development / marketing website in Australia (?), with a world-wide reach.</li>
<li><a href="http://craigslist.org">Craig's List</a> - The 900lb Gorilla of Online Classifieds</li>
</ul>

<h2>Contract Jobs</h2>

<ul>
<li><a href="http://www.freelancer.com/">Freelancer.com</a> - Another freelancer board.</li>
<li><a href="http://www.guru.com">Guru.com</a> - Another freelance job board for tech, creative, and business. </li>
<li><a href="http://odesk.com">oDesk</a> - The "marketplace for online workteams", oDesk tracks time and handles invoicing and collections from its users. International presence.</li>
<li><a href="http://www.rentacoder.com/RentACoder/DotNet/default.aspx">Rent-A-Coder</a> - Project and gigs for programmers.</li>
<li><a href="http://sologig.com">Solo Gig</a> - Offers freelance and part-time jobs in the United States. It's affiliated with CareerBuilder.com.</li>
</ul>

<h2>Speculative Work / Competition Projects / Crowdsourcing</h2>

<p>These companies all have slightly different models in hooking clients with prospects. Some are outright "competitions" for a fixed cash prize. Others are more like marketplaces.</p>

<ul>
<li><a href="http://99designs.com/">99Designs</a> - Designers submit their designs in a contest, and the winner gets paid. </li>
<li><a href="http://www.crowdspring.com/">CrowdSpring</a> - Another spec work contest site, geared slightly more toward enterprise-level seekers of designers and writers.</li>
<li><a href="http://designoutpost.com">Design Outpost</a> -  Projects for bid</li>
<li><a href="http://designtourney.com/">Design Tourney</a> - Projects for bid</li>
<li><a href="http://elance.com">eLance</a> - Another freelance jobs board, with management tools for employers. Results-based payment through the site.</li>
<li><a href="https://www.mturk.com/mturk/welcome">Mechanical Turk</a> - Amazon's "Artificial Artificial Intelligence" is a marketplace for people to make a little side cash doing things that computers are bad at. </li>
<li><a href="http://www.visualswirl.com/2010/02/99-alternatives-to-99designs/">Alternatives to Crowdsourcing</a> - This is a nice list of 99 alternatives to doing spec work on a site like 99Designs.</li>
</ul>

<p>Informational Posts</p>

<ul>
<li><a href="http://www.no-spec.com/">No Spec!</a> - Not a job board, but a whole site dedicated to arguing against sites like these contest/competition job sites.</li>
<li><a href="http://www.wired.com/wired/archive/14.06/crowds.html">Crowdsourcing on WIRED</a> - An article about the growing thrend toward crowdsourcing, and the pressure on professionals and pricing.</li>
</ul>

<h2>Specialty Job Boards</h2>

<ul>
<li><a href="jobs.joelonsoftware.com">Joel Spolsky Job Board</a> - Software developers and companies that follow Joel On Software; typically followers of JoS are quality-conscious professional software practitioners who love development.</li>
<li><a href="http://jobs.37signals.com/">37Signals Job Board</a> - 37Signals is a well-regarded developer of online business software, a leader in Ruby on Rails web development. Followers of 37Signals are likely to be passionate about web development, web standards, and cutting-edge web applications.</li>
<li><a href="http://gamasutra.com/jobs">Gamesutra Jobs</a> - Gamasutra is a video game developer portal site. Their job boards list positions for 3D animators, GUI designers, programmers, and simulation experts.</li>
<li><a href="http://designobserver.coroflot.com/public/jobs_browse.asp">Design Observer</a> job boards for creatives.</li>
<li><a href="http://www.creativeheads.net/">Creative Heads</a> - jobs for creatives in video game, VFX, software/technology industries.</li>
</ul>


      ]]></content>
    </entry>

    <entry>
      <title>index</title>
      <link rel="alternate" type="text/html" href="http://davidseah.com/wikilab/index/" />
      <id>tag:davidseah.com,2010:wiki:index/1.781</id>
      <published>2010-03-11T18:26:44Z</published>
      <updated>2010-03-11T18:26:44Z</updated>
      <author>
            <name>Dave Seah</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        <p>This Wiki is where I keep track of notes to myself. Feel free to read the notes. They are, however, editable only to me.</p>

<h2>Blogging &amp; Hosting</h2>

<ul>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FExpression-Engine-Migration-Notes%2F" title="Expression-Engine-Migration-Notes">Expression Engine Migration Notes</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FExpression-Engine-Updating%2F" title="Expression-Engine-Updating">Expression Engine Updating</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FExpression-Engine-Modification%2F" title="Expression-Engine-Modification">Expression Engine Modification</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FVideo-Blogging-Notes%2F" title="Video-Blogging-Notes">Video Blogging Notes</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FGetting-Started-with-Web-Hosting%2F" title="Getting-Started-with-Web-Hosting">Getting Started with Web Hosting</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FMedia-Temple-dv-Configuration%2F" title="Media-Temple-dv-Configuration">Media Temple dv Configuration</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FMigrating-from-Media-Temple-dv-3.0-to-dv-3.5%2F" title="Migrating-from-Media-Temple-dv-3.0-to-dv-3.5">Migrating from Media Temple dv 3.0 to dv 3.5</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FSetting-Up-CentOS-on-Virtual-PC-Windows-7%2F" title="Setting-Up-CentOS-on-Virtual-PC-Windows-7">Setting Up CentOS on Virtual PC Windows 7</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FMySQL-Optimization-Tips%2F" title="MySQL-Optimization-Tips">MySQL Optimization Tips</a></li>
</ul>

<h2>Business &amp; Freelancing</h2>

<ul>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FDave%2527s-Agency-Design-Home-Page%2F" title="Dave&#39;s-Agency-Design-Home-Page">Dave's Agency Design Home Page</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FStorytelling-and-Business%2F" title="Storytelling-and-Business">Storytelling and Business</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FGroundhog-Day-Resolution-Design%2F" title="Groundhog-Day-Resolution-Design" class="noArticle">Groundhog Day Resolution Design</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FCreative-Business-Dossier%2F" title="Creative-Business-Dossier">Creative Business Dossier</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FSelling-Stuff-Online%2F" title="Selling-Stuff-Online">Selling Stuff Online</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FFreelance-Gigs-and-Job-Sites%2F" title="Freelance-Gigs-and-Job-Sites">Freelance Gigs and Job Sites</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FFree-Font-Download-Sources%2F" title="Free-Font-Download-Sources">Free Font Download Sources</a></li>
</ul>

<h2>Computer Maintenance</h2>

<ul>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FMacbook-Pro-Windows-Installation%2F" title="Macbook-Pro-Windows-Installation">Macbook Pro Windows Installation</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FMigrating-Email%2F" title="Migrating-Email">Migrating Email</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FRock-Solid-Software%2F" title="Rock-Solid-Software">Rock Solid Software</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FWinClone-for-Mac-OS-X%2F" title="WinClone-for-Mac-OS-X">WinClone for Mac OS X</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FWindows-Maintenance%2F" title="Windows-Maintenance">Windows Maintenance</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FInput-Devices%2F" title="Input-Devices">Input Devices</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FCreating-2-Windows-Partitions-with-Boot-Camp%2F" title="Creating-2-Windows-Partitions-with-Boot-Camp">Creating 2 Windows Partitions with Boot Camp</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FSandisk-U3-LaunchPad-Removal%2F" title="Sandisk-U3-LaunchPad-Removal">Sandisk U3 LaunchPad Removal</a></li>
</ul>

<h2>DIY Fabrication, Products</h2>

<ul>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FMaking-and-Selling-Stuff%2F" title="Making-and-Selling-Stuff">Making and Selling Stuff</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FEvent-Management%2F" title="Event-Management">Event Management</a></li>
</ul>

<h2>Photography</h2>

<ul>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FCanon-EF-Lenses-List%2F" title="Canon-EF-Lenses-List">Canon EF Lenses List</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FLaptop-Camera-Bags%2F" title="Laptop-Camera-Bags">Finding the Ideal Laptop Camera Bag</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FThe-Cutest-Camera-Gear%2F" title="The-Cutest-Camera-Gear">The Cutest Camera Gear</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FCamera-Hot-Shoe-Circuits%2F" title="Camera-Hot-Shoe-Circuits">Camera Hot Shoe Circuits</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FFlash-Photography%2F" title="Flash-Photography">Flash Photography</a></li>
</ul>

<h2>Programming &amp; Development</h2>

<ul>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FDirectX-Development-Primer%2F" title="DirectX-Development-Primer">DirectX Development Primer</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FWindows-Systems-Programming%2F" title="Windows-Systems-Programming">Windows Systems Programming</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FWindows-Debugging%2F" title="Windows-Debugging">Windows Debugging</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FCreating-a-Hybrid-CD-ROM%2F" title="Creating-a-Hybrid-CD-ROM">Creating a Hybrid CD ROM</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FDevice-Driver-Specialists%2F" title="Device-Driver-Specialists">Device Driver Specialists</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FXNA-Realtime-Game-Architecture-Notes%2F" title="XNA-Realtime-Game-Architecture-Notes">XNA Realtime Game Architecture Notes</a></li>
</ul>

<h2>Audio Stuff</h2>

<ul>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FiPod-Accessories%2F" title="iPod-Accessories">iPod Accessories</a></li>
</ul>

<h2>Design Process &amp; Education</h2>

<ul>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FGraphic-Design-Book-List%2F" title="Graphic-Design-Book-List">Graphic Design Book List</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FCSS-Notes%2F" title="CSS-Notes">CSS Notes</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FWeb-Development-Notes%2F" title="Web-Development-Notes">Web Development Notes</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FTypography%2F" title="Typography">Typography</a></li>
</ul>

<h2>Special Interests</h2>

<ul>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FTarot-Cards%2F" title="Tarot-Cards">Tarot Cards</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FFood-Destinations%2F" title="Food-Destinations">Food Destinations</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FPeople-Doing-Cool-Things%2F" title="People-Doing-Cool-Things">People Doing Cool Things</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FDesign-Patterns%2F" title="Design-Patterns">Design Patterns</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FScooters%2F" title="Scooters">Scooters</a></li>
<li><a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FQuality-Driven-Companies%2F" title="Quality-Driven-Companies">Quality Driven Companies</a></li>
</ul>


      ]]></content>
    </entry>

    <entry>
      <title>Free Font Download Sources</title>
      <link rel="alternate" type="text/html" href="http://davidseah.com/wikilab/Free-Font-Download-Sources/" />
      <id>tag:davidseah.com,2010:wiki:Free Font Download Sources/114.772</id>
      <published>2010-02-23T15:42:50Z</published>
      <updated>2010-02-23T15:42:50Z</updated>
      <author>
            <name>Dave Seah</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        <p>Putting together my list of quality LEGAL free or inexpensive font downloads...</p>

<ul>
<li><a href="http://www.fontsquirrel.com/">FontSquirrel</a> looks promising for free font downloads.</li>
<li><a href="https://www.chank.com/shop/results/">Chank Fonts</a> is a digital type foundry that has several free and inexpensive (like, 2 bucks) fonts in addition to their more expensive offerings.</li>
<li><a href="http://dejavu-fonts.org/">Deja Vu Fonts</a> are a family of sans, mono, and serif fonts based on the Vera font family. Deja Vu Mono Sans, for example, adds more unicode characters to the Vera Mono Sans font.</li>
<li><a href="http://www.smashingmagazine.com/tag/typography/">Smashing Magazine's Typography Category</a> often lists new, free-to-download fonts in its regular coverage.</li>
</ul>


      ]]></content>
    </entry>

    <entry>
      <title>Laptop Camera Bags</title>
      <link rel="alternate" type="text/html" href="http://davidseah.com/wikilab/Laptop-Camera-Bags/" />
      <id>tag:davidseah.com,2010:wiki:Laptop Camera Bags/5.754</id>
      <published>2010-02-06T04:30:12Z</published>
      <updated>2010-02-06T04:30:12Z</updated>
      <author>
            <name>Dave Seah</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        <p>The search for an ultimate camera/laptop travel/carrying solution continues. I want to carry my <strong>17" MacBook Pro</strong> (my main development system) and a <strong>Canon EOS 40D DSLR</strong> with me in one bag that doesn't look terrible. The goal is to have a <strong>portable digital media agency</strong> that fits in a single professional-appearing bag that doesn't call too much attention to itself.</p>

<ul>
<li>EOS 40D dimensions: 146 x 108 x 74 mm (5.7 x 4.2 x 2.9 in)</li>
<li>MacBook Pro 17" dimensions: 39.2 x 26.5 x 2.59 cm (15.4 x 10.4 x 1.0 in)</li>
</ul>

<p>While there are a lot of larger camera bags available, most of them are designed to carry only camera gear. I'm looking for a bag that is designed for the person who wants to carry a DSLR <em>with</em> additional work gear. For me, that's several paper notebooks, some electronic gadgetry, power supplies, and compact external keyboard/mouse.</p>

<p>While the ThinkTank UD60 can carry it all in one package, I am now leaning toward a two-bag system for better weight distribution and modularity. For laptops, I tend to prefer <strong>vertical briefcases</strong> that have detachable backpack straps as a carry option.</p>

<p>Bags in <strong>bold</strong> are the ones I've been personally using. This list favors bags that I believe are obsessive or unique in their approach to style, ruggedness, and use in the field.</p>

<p>Reviews follow after the list. If you are a bag manufacturer that would like your bag reviewed, contact me! We'll put it through the wringer and figure out what we would use it for.</p>

<h4>Bags that can carry a DSLR + 17" Laptop</h4>

<p>NOTE: If you follow any of the ThinkTank product links and decide to purchase, you'll get an <strong>additional gift</strong> from them because of the referral program that they are offering through this site (apparently, this page sends them quite a few referrals). The gifts are: Cable Management 20, Pixel Pocket Rocket, Modular Pouch, or Security Tag, and appear when you are checking out of their online store.</p>

<ul>
<li>The <strong><a href="http://www.thinktankphoto.com/products/urban-disguise-60-shoulder-computer-bag.aspx?code=AP-383">Think Tank Urban Disguise 60</a></strong> is a nondescript bag, but holds a ton of camera gear and laptop accessories. Particularly this <a href="http://photography-on-the.net/forum/showthread.php?p=4271694#post4271694">review</a> by a student, which shows the camera stuck in the side with tons of other stuff. You can even buy a backpack harness for it. AND it has a compartment for a 17" laptop! My professional portrait photographer buddy Sid, after "much coveting" of my bag, has <a href="http://www.flickr.com/photos/ceaserfineartphotography/3506039816/in/pool-camerabag/">posted his review on Flickr</a>.</li>
<li>The <a href="http://www.crumplerbags.com/Cart/index.php?catId=22&amp;prodId=207&amp;optId=10311">Crumpler Customary Barge</a> Laptop / SLR Bag</li>
<li>The <a href="http://www.naneupro.com/products/mo-e/">Naneu Pro Military Ops Echo</a> is a military-style bag that holds a DSLR. There is one bag in this line that can take a 15" laptop. The <a href="http://www.naneupro.com/products/ug-u220/">Urban Gear U220</a> is a monster backpack, but does hold both a DSLR and a 17" laptop.</li>
<li>I recently found that the <a href="http://www.thinktankphoto.com/products/airport-security-v2-roller-camera-bag.aspx?code=AP-383">Think Tank Airport Security</a>, which is a rolling bag filled with dividers, has a "low divider" option that allows a 17" laptop in their <a href="http://www.thinktankphoto.com/products/artificial-intelligence-17-computer-sleeve.aspx?code=AP-383">Artificial Intelligence laptop carrier</a> to be placed on top of it. This may be an option for carrying a lot more gear than I am now, more comfortably. You can also order some "emergency backpack straps" if you need to carry on your back. VERY INTRIGUING.</li>
<li><a href="http://www.kata-bags.com/product.asp?p_Id=401&amp;Version=Photo">Kata DR-467</a> is an intriguing backpack that will take a 15" laptop. Unlike other photo backpacks it's not mostly for carrying camera gear. The compartment for the camera sort of pops out at the bottom. I saw this bag in person, and although the design leaves me a little cold, the features seem pretty intelligent. The Kata site lists this backpack as fitting a 17", but the dimensions don't seem to match up.</li>
<li>My sister pointed me to the "for men" <a href="http://www.jill-e.com/jack/index.html">Jack Series</a> from Jill.e (makers of cute women's camera bags). I'm looking at the <a href="http://www.jill-e.com/jack/jack_lrg_brown_cb.html">Jack rolling bag</a>, which will take a 17" laptop. It is one of those divider-style bags, though, so it may not be quite as useful for my needs.</li>
<li>Ben points me to the <a href="http://products.lowepro.com/product/Fastpack-350,2087,14.htm">Lowepro Fastpack 350</a>, which has an interesting configuration. He doesn't like the lightness of the build.</li>
</ul>

<h4>Vertical Bags for 17" Laptops Only</h4>

<ul>
<li><strong>The <a href="http://www.be-ez.com/prod_levertigo17.html">LEvertigo 17</a></strong> is a vertical design laptop bag for a MBP 17. This might be the one, or the one in graphite. I like the vertical brief design. Unfortunately, it doesn't have room for the DSLR. Bother.</li>
<li>The <a href="http://www.timbuk2.com/tb2/products/outtawhack-day-pack">Timbuk2 Outtawhack</a> Laptop Bag</li>
<li>The <a href="http://goincase.com/products/detail/nylon-sling-pack-cl55026">InCase Nylon Sling Pack</a> also looks nice in the single-sling, sleek vertical format. The backpack version is a little larger.</li>
<li><a href="http://www.sfbags.com/">Waterfield</a> makes some stylish messenger-inspired bags, including the minimalist <a href="http://www.sfbags.com/products/vertigo/vertigo.htm">Vertigo</a> vertical 17" laptop bag. </li>
<li>For 17" laptop vertical brief carry only, the <a href="http://www.tombihn.com/page/001/PROD/300/TB0390">Tom Bihn Vertical Brain Cell</a> looks pretty interesting. Perhaps it can be combined with a dedicated photo bag.</li>
</ul>

<h4>For carrying Digital SLRs Only</h4>

<ul>
<li><a href="http://www.tiffen.com/products.html?tablename=domke">Domke</a> makes several camera bags that are more non-descript. Cool Tools even <a href="http://www.kk.org/cooltools/archives/001648.php">mentioned it</a>. Of greater interest to me: the <a href="http://www.tiffen.com/results.html?search_type_no=8&amp;tablename=domke&amp;family=Domke+Camera+Bags">Domke inserts</a>, which are self-contained and could possibly be used in another bag. Unfortunately, they don't make a snug one that would be perfect for the 40D dimensions (I need one that's no more than 4.2 in wide to carry the EOS 40D)</li>
<li><a href="http://www.courierwareusa.com/">Courierware</a> makes custom bags. Founded by bike couriers. They have a soft camera bag that will hold DSLRs, and they also make laptop bags, but they don't have a combined solution.</li>
<li>I read on <a href="http://www.rousette.org.uk/blog/archives/Bag-lady/">BSAG</a> about the <a href="http://www.maxpedition.com">Maxpedition</a> tactical carry products. While designed to carry concealed handguns, they also can be used to carry a lot of gear w/ 15" laptops. The <a href="http://www.maxpedition.com/store/pc/viewPrd.asp?idcategory=13&amp;idproduct=62">MPB briefcase</a> would make a fine photo/laptop bag. The <a href="http://www.maxpedition.com/store/pc/viewCategories.asp?idCategory=4">Versipacks</a> look awesome too for just carrying photo gear in a neat sling system.</li>
</ul>

<h4>Components for Rolling Your Own Solution</h4>

<ul>
<li>Rubberized skins for DSLR <a href="http://www.camerarmor.com/">Made Products</a>, for minimal weatherproof carry. </li>
<li>Neoprene rubberized <a href="http://optechusa.com/">Straps by OpTech</a>. Comfortable and bouncy.</li>
<li>The <a href="http://www.prostrap.com/">ProStrap</a>, another nice camera strap.</li>
<li><a href="http://www.pacsafe.com/www/index.php">Pacsafe</a> makes some interesting secure bags and straps, reinforced with wire to prevent snatch and grabs. They sell camera inserts that could be put into a larger bag, and also dedicated laptop and camera bags. </li>
<li><a href="http://www.ortliebusa.com/cartgenie/prodInfo.asp?pid=115&amp;cid=2">Ortlieb</a> makes an interesting camera bag insert for their bicycle bags. Some other interesting camera bags too...very square-edged and cool looking.</li>
</ul>

<hr />

<h2>REVIEW: Think Tank Urban Disguise UD60</h2>

<p>It's 16L x 11.25H x 4.25D in internal dimensions, and it fits my 40D carried lens-down. This leaves a 10 x 11.25 x 4.25 in volume next to it for carrying papers and books. The laptop compartment is 16 x 11.25 x 1.5 in, which is plenty of room. Overall dimensions: 16.5 x 12 x 6 in.</p>

<p>This is currently my favorite larger bag. You can see some <a href="http://flickr.com/photos/da5zeay/sets/72157603995833269/">photos of the bag</a> to see how I configured the internal compartment for the Canon EOS40D. I've taken this bag to South by SouthWest (SXSW), carrying around about 25 pounds worth of gear, and have shlepped it between the east and west coasts as carry-on luggage.</p>

<ul>
<li>17" Mac Book Pro w/ Power Transformer (about 8-9 pounds)</li>
<li>Canon EOS 40-D with EF-S 17-55mm f/2.8 IS USM + Lens Hood (not reversed, either) (around 4 pounds)</li>
<li>Small Fuji FinePix F30d digital camera</li>
<li>Chargers and Media Reader tucked in the sides</li>
<li>Books, Magazines, Pens</li>
</ul>

<p>With the optional backpack strap accessory, walking to and from the convention center (about an 8 minute walk) was not bad at all. Even better: when it rained, I could drape my light windbreaker over the bag to shield it from rain. I could have optionally used the included Rain Shield, which is a waterproof covering you can put around the bag. I'm not sure how it would work with the shoulder strap though. The back pack attachment is definitely worth it for hands-free carrying of heavy gear.</p>

<h4>Six Month Review</h4>

<p>I've brought the bag with me to San Jose. It fits nicely under the airplane seat, has plenty of pockets. The build of the bag is a little lighter than what I'm used to, but I'm pretty happy with it. No tears, no problems, no signs of wear or impending collapse. I've mostly been hauling it around by the shoulder strap (no sign of fraying) in the back of my Volkswagen GTI.</p>

<h4>Nine Month Review</h4>

<p>A few observations with the bag:</p>

<ul>
<li>The padding in the bottom corners of the bag is a little thin, so if you hit a corner <em>just right</em> it can impact the corner of my laptop. This has only happened once at an airport. The Think Tank bag philosophy seems to lean towards more capacity with less padding, and typically I have found this fine in my day-to-day use. Compared to my Briggs &amp; Riley 17" soft brief, the UD60 is lightly-armored but carries a LOT more, more flexibly. If tend to be careful with your bags, as I am, you probably won't have many problems. The outer pockets actually seem to work pretty well as armor with the cables and what not I have in them. </li>
<li>The backpack straps are really useful when running through the airport, but they are a little cumbersome to use when the bag is filled with 25 pounds of gear. They tend to flip inside out while shrugging them on (especially if you are wearing a heavy wool coat), and it can be trying to figure out which way they've flipped to correct the problem. Otherwise, the backpack straps are comfortable once on. I loosen the straps all the way and tighten them once they're on my back. If the buckles were a little more oversized it would be more convenient. Also, the backpack straps interfere with the opening of the bag, so you have to detach them from the carrying handle. This is fairly quick, but it's one thing that gets in the way. </li>
<li>When fully loaded with laptop + accessories in the pockets, the bag does tend to slowly fall over if I put it on the ground. I may be overstuffing it. </li>
</ul>

<p>Otherwise, I'm pretty happy with it. The one functional drawback, though, is that with my camera loaded in the bag I don't have much room for magazines or regular notebooks. There is one inner pocket that can take a notebook and a few magazines, and the outer pouch can take another one, which I'm finding merely adequate. I sometimes use the UD60 primarily as a gear bag, and use a Briggs and Riley Vertical Brief for paper + a netbook. Or, I use the LEvertigo 17 for the notebook + accessories, and use the laptop compartment of the UD60 for additional folder storage.</p>

<p>One other note: the shoulder strap that this bag comes with is just AWESOME. I have thought of ordering extra ones for my Briggs and Riley 17" Computer Brief, which I used to think had a decent shoulder strap but it's horrible by comparison.</p>

<p>LINK: <strong><a href="http://www.thinktankphoto.com/products/urban-disguise-60-shoulder-computer-bag.aspx?code=AP-383">ThinkTank Urban Disguise Site</a></strong></p>

<h2>REVIEW: Be.ez LEvertigo 17</h2>

<p>I picked up one of these bags when I was at the Mac-Pro store in San Jose, California, which happens to be the only North American distributor for Be.ez. My Think Tank UD60 was getting awfully full of stuff, and the way I have my bag packed with the Canon EOS 40D makes it difficult to carry larger paper notebooks.</p>

<p>The construction of the bag is sleek and stylish, and it does hold a MacBook Pro 17 very nicely. The fit is snug, to the point where my Speck-encased laptop makes it a little difficult to lock down. There are no external pockets at all, so you need to lift the front flap to access the inner pockets. While the bag doesn't hold an incredible amount, you can certainly carry pens, a couple of notebooks, and a fair number of accessories (iPod, charger, small digital camera, cables, etc). The bag is actually wedge shaped, the bottom wider than the top, which allows one to pack in more stuff in the bottom pockets without unsightly bulges.</p>

<p>Functionally speaking, one drawback of this bag is that it has a tendency to lean forward (toward the front flap) when you set it on the ground. It falls over fairly readily. To compensate for this, you just turn it around, but it makes accessing the pockets while at Starbucks slightly awkward. There is no top handle on the bag either, which helps keep the lines clean but makes repositioning slightly awkward because you need to grab the long seatbelt-style shoulder strap. However, on my shoulder the bag is very comfortable and close-fitting because of the vertical briefcase style.</p>

<p>The form factor of this bag is more well suited for traveling light to a meeting. When I need to carry a ton of gear, I use the Think Tank UD60 with backpack straps. I may use the LEvertigo as my permanent day-to-day laptop transportation solution, and keep the UD60 for the digital camera and supplies, but that sort of defeats the purpose of having a single bag that can carry both.</p>

<h4>A few months of use later</h4>

<p>This bag is aging fairly well, though the soft pocket material seems to have developed some very slight wear. I'm not sure how well the zippers will hold up over time, but they are not under a lot of stress. When I'm just carrying my laptop, it holds everything I need plus a couple of notebooks for writing in. I think this bag has been replaced by something newer last time I was visiting the sole North American distributor in San Jose, but I haven't yet really had a good look at it.</p>

<p>CON: I walked around Campbell, Northern Cal in February 2009, loaded with the 17" MacBookPro encased in a Speck clear case (it still fits!). The bag's fasteners were squeaking very loudly and annoyingly. I am going to try to put some graphite on it to reduce the noise. It appears to be coming from where the loops meet each other; they are a kind of textured metal that are rubbing against each other.</p>

<p>AESTHETIC WEAR: The striping around the edge of the bag is getting worn and ratty-looking. I think it used to be white, but now it's gray. In patches.</p>

<p>LINK: <strong><a href="http://www.be-ez.com/prod_levertigo17.html">Be.ez LEVertigo 17</a></strong></p>


      ]]></content>
    </entry>

    <entry>
      <title>CodeIgniter Integration Notes</title>
      <link rel="alternate" type="text/html" href="http://davidseah.com/wikilab/CodeIgniter-Integration-Notes/" />
      <id>tag:davidseah.com,2010:wiki:CodeIgniter Integration Notes/112.746</id>
      <published>2010-01-22T04:44:49Z</published>
      <updated>2010-01-22T04:44:49Z</updated>
      <author>
            <name>Dave Seah</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        <h2>So What Is CodeIgniter?</h2>

<p>I don't really know what it is and what it does, other than you can build dynamic websites with it. Expression Engine 2.0 was "built on it", so that is automatically cool.</p>

<p>Rather than read the documentation and be confused, let me write out first what I <em>think</em> it is...</p>

<p>Well, it's supposed to make dynamic websites, which essentially are web-based applications. That means it should help me do the following:</p>

<ul>
<li>Define a website URL structure; these are the "application paths".</li>
<li>Render webpages from some kind of template language.</li>
<li>Provide the means to implement access control.</li>
<li>Have the notion of an anonymous guest, members, admins.</li>
<li>Provide the means to define roles and settings and parameters</li>
<li>Provide means of loading and storing things from databases</li>
<li>Maybe provide some way of defining "pages", whatever that means</li>
<li>Handle sundry tasks like get data from forms, format text, encode for databases</li>
<li>File management?</li>
<li>The ability to identify unique sessions?</li>
<li>Manage multi-page transactions</li>
<li>Maybe handle AJAX stuff, Event handling, DOM handling (?) </li>
</ul>

<p>That is not a very helpful description. So let me try again: when I go to a certain URL:</p>

<ul>
<li>First, the URL is converted to something that the framework can use to understand user intention.</li>
<li>A bunch of state is made available to the PHP app that's running.</li>
<li>Based on that state, a decision is made on what content to show.</li>
<li>Data is pulled from databases, and formatted in HTML!</li>
<li>The formatted HTML is inserted into another template</li>
<li>The complete HTML document is shot back to the browser.</li>
<li>Asynchronous events from the browser, tagged by session ID, are handled, which results in new data being rendered in the browser through Javascript handlers that manipulate the document DOM.</li>
<li>Each page is essentially a stand-alone web app that can have multiple steps.</li>
</ul>

<p>That's still not very helpful. At this point, I want to see what the <strong>CodeIgniter main system components</strong> are. The Library Functions Reference Sheet lists each library, in typical alphabetical order. I am going to reorder them by concept.</p>

<p>HTML OUTPUT</p>

<ul>
<li>Calendaring Class</li>
<li>HTML Table Class</li>
<li>Pagination Class</li>
<li>Template Parser Class</li>
<li>Typography Class</li>
<li>Language Class</li>
</ul>

<p>BROWSER &lt;-&gt; SERVER</p>

<ul>
<li>File Uploading Class</li>
<li>Form Validation</li>
<li>Form Helper Referenece</li>
<li>Input &amp; Security Class</li>
</ul>

<p>FANCY SESSION MANAGEMENT</p>

<ul>
<li>Shopping Cart Class</li>
<li>Transactions</li>
</ul>

<p>APP FRAMEWORK</p>

<ul>
<li>Config Class</li>
<li>Custom Function Calls</li>
<li>Loader Class</li>
<li>Session Class</li>
<li>URI Class</li>
<li>User Agent Class</li>
<li>Output Class</li>
</ul>

<p>TESTING</p>

<ul>
<li>Benchmark Class</li>
<li>Unit Testing Class</li>
</ul>

<p>DATABASE</p>

<ul>
<li>Database Class - Queries</li>
<li>Database Class - Query Results</li>
<li>Database Query Helper</li>
<li>Database - Inserting Data </li>
<li>Database - Updating Data</li>
<li>Database - Deleting Data</li>
<li>Database - Active Record Caching</li>
<li>Database Caching Class</li>
<li>Database Forge Class</li>
<li>Creating and Dropping Tables</li>
<li>Modifying Tables</li>
<li>Database Utility Class</li>
<li>Table Data</li>
<li>Field Data</li>
</ul>

<p>INTERNET SERVICES</p>

<ul>
<li>Email Class</li>
<li>FTP Class</li>
</ul>

<p>DATA TRANSFORMATION</p>

<ul>
<li>Encryption Class</li>
<li>ZIP Encoding Class</li>
<li>Image Manipulation Class</li>
</ul>

<p>WEB SERVICES</p>

<ul>
<li>XML-RPC &amp; XML-RPC Server Classes</li>
<li>Trackback Class</li>
</ul>


      ]]></content>
    </entry>

    <entry>
      <title>Web Development Notes</title>
      <link rel="alternate" type="text/html" href="http://davidseah.com/wikilab/Web-Development-Notes/" />
      <id>tag:davidseah.com,2010:wiki:Web Development Notes/90.744</id>
      <published>2010-01-22T04:13:16Z</published>
      <updated>2010-01-22T04:13:16Z</updated>
      <author>
            <name>Dave Seah</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        <p>I've never really liked web development, primarily because of the need to learn all these browser inconsistencies and deal with them. I guess I'm an idealist programmer, and tend to choose environments that are more universal in deployment. This tends to put me in the realm of virtual machines or authoring environments.</p>

<p>However, as I am striving to be a good content creator on the Internet, there's a certain amount of web development that I need. And also, I find myself offering to help build people's websites because this is a necessary component of <em>The Mission</em> of connecting people with motivating ideas.</p>

<p>So, say you need to <strong>develop a website</strong>...how can you do it with the least amount of pain and suffering, with the most features, an incremental path toward improvement, and retention of control over its visual appearance?</p>

<p>A TALL ORDER.</p>

<h3>Picking a base offering</h3>

<p>I'm familiar with three ways of developing websites: custom static HTML, modified WordPress Themes, and modified Expression Engine Themes. WordPress and Expression Engine are <em>content management systems</em> (CMS) that use databases (MySQL) and server-side scripting languages (in this case PHP). The advantages of a CMS is that they incorporate a lot of useful functionality that people tend to expect in a full-blown website.</p>

<p>Well, for now I'm going to go with ModX. Here are my <a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FModX-Integration-Notes%2F" title="ModX-Integration-Notes">ModX Integration Notes</a>.
And here are my <a href="http://davidseah.com/?URL=http%3A%2F%2Fdavidseah.com%2Fwikilab%2FCodeIgniter-Integration-Notes%2F" title="CodeIgniter-Integration-Notes">CodeIgniter Integration Notes</a>.</p>


      ]]></content>
    </entry>

    <entry>
      <title>Setting Up CentOS on Virtual PC Windows 7</title>
      <link rel="alternate" type="text/html" href="http://davidseah.com/wikilab/Setting-Up-CentOS-on-Virtual-PC-Windows-7/" />
      <id>tag:davidseah.com,2010:wiki:Setting Up CentOS on Virtual PC Windows 7/99.740</id>
      <published>2010-01-20T06:06:06Z</published>
      <updated>2010-01-20T06:06:06Z</updated>
      <author>
            <name>Dave Seah</name>
            <email></email>
      </author>
      <content type="html"><![CDATA[
        <p>The big idea: install Virtual PC on Windows 7, create a VM to run CentOS 5, and create a LAMP server. CentOS 5 is the same Linux distribution, more or less, as the MediaTemple (dv) 3.5 system I'm running. I want to simulate this.</p>

<p>Rough Notes follow:</p>

<h3>Create the Virtual Machine</h3>

<p>256MB machine.</p>

<p>Two network adapters. Set the first one to SHARED, which allows the VM to bridge through the host PC's network connection (albeit mapped to the 192.168.136.* range). However, this makes the machine unreachable. So I make sure the second adapter is set to my wireless interface (this is being installed on a laptop), which runs primarily over wireless network. Localhost is also configured.</p>

<p>The first network adapter uses DHCP. The second uses an assigned IP for my local network at home, so other machines on my network can see it. This includes the laptop itself, as the VM is not technically "localhost" as far as Windows 7 is concerned.</p>

<p>(Note: Because I guffed up the initial settings before installing CENTOS, I had to re-edit the system configuration, by running <code>system-config-network</code> from the command line.)</p>

<h3>Install CentOS</h3>

<p>Insert the DVD, and then boot the virtual machine. It automatically sees the DVD and installs normally. Since I have only 256M allocated to this VM, I am running it in server mode with no GUI. 256MB is about the same size as the minimum Media Temple virtual server, and it's capable of handling thousands of hits per hour...if you've tuned it right.</p>

<p>Menus menus menus. If you've set up the VM right, you won't have to go back and redit the file.</p>

<p>After installing, I did have to edit <code>/boot/grub/menu.lst</code> and add the line <code>clock=pit</code>. See this <a href="http://support.microsoft.com/kb/918461">knowledge base article</a> on Microsoft regarding this issue. You'll see the error "TSC appears to be running slowly. Marking as unstable." if you don't.</p>

<h3>Setting up the System</h3>

<p>I need to assign a local HOSTS entry. This  knowledebase article <a href="http://support.microsoft.com/kb/923947">shows how to edit hosts in Windows 7</a> but my system doesn't appear to have it. It's supposed to live in <code>%systemroot%\system32\drivers\etc\</code>, but I don't see it. I suppose I could just <a href="http://www.brighthub.com/computing/smb-security/articles/56592.aspx">create a new hosts file</a>, but I'd like to know why it's missing. I ran the Microsoft <a href="http://support.microsoft.com/kb/972034">Reset Hosts File FixIt App</a>, and tried again...DOH, NotePad was defaulting to showing just .TXT files, which of course the HOSTS file doesn't have. Duh duh duh.</p>

<p>Well, apparently this still doesn't work, because right now I'm at Starbucks and the local network setup is different. Re-reading the networking options for Virtual PC, I see that I can install something called the Microsoft Loopback Adapter, and make all the VMs use this instead, as described <a href="http://codebetter.com/blogs/paul.laudeman/archive/2005/04/19/Microsoft-Virtual-PC-Tip-_2D00_-Using-the-Microsoft-Loopback-Adapter.aspx">here</a> for Windows XP.</p>

<ul>
<li>Virtual PC Settings for VM: 1 Network Adapter set to "Internal Networking"</li>
<li>Go to Device Manager, choose "Add Legacy Hardware" fro the Action Menu, browse to Network Adapters / Microsoft / Microsoft Loopback Adapter. This seems to automatically hook into the Virtual PC Internal Networking thing somehow.</li>
</ul>

<p>Starting up the VM again to see what happens. Do I need to re-run the system networking config?</p>

<h2>time passes...</h2>

<p>Note I installed the Microsoft Loopback Adapter: http://blogs.msdn.com/virtual_pc_guy/archive/2005/10/04/477195.aspx</p>

<p>Checking Windows 7 Network and Sharing Center:
Unidentified Network is set to the "Microsoft Loopback Connection". But I'm not sure if the host OS knows how to see thinks on it. Clicking on it and seeing properties...
.. it's got TCP/IPv4</p>

<p>I probably need to redetect the CENTOS network adapter to configure it. How do I do that?</p>

<p><code>system-config-network</code> at the command line!</p>

<p>I set manual DNS to 10.20.10.100 / 255.255.255.0</p>

<p><code>/etc/init.d/network restart</code></p>

<p>In Windows 7, I set "Microsoft Loopback" adapter properties to 10.20.10.1 / 255.255.255.0 both in "configure" and "ipv4". Make sure that the Virtual PC Network Filter is still checked.</p>

<p>It works! I can SSH in and ping from the Windows command line to 10.20.10.100, no problem. However, I can't hit the web server. The web logs in <code>/var/httpd/logs</code> show no activity either. However, I <em>can</em> do a <code>wget</code> of localhost, and this works.</p>

<p>Let's see if APACHE is running. Where is it on CentOS? According to /etc/init.d/httpd, 
<code>/etc/httpd/conf/httpd.conf</code><br />
<code>/etc/sysocnfig/httpd</code></p>

<p>Where is DocumentRoot according to httpd.conf file?</p>

<p><code>DocumentRoot "/var/www/html"</code></p>

<p>Apparently, the CentOS machine isn't responding to requests but it's detected. I wasted some time looking at the old tcpd setup (hosts.allow, hosts.deny) and xinet.d, but these weren't the culprit. I also made sure the services were running with <code>ps</code> and these commands:</p>

<p>.. service start httpd
.. chkconfig httpd on</p>

<p>Snooping on the internet more, found this reference to iptables, which is the redhat firewall:
http://www.xenocafe.com/tutorials/linux/redhat/iptables/iptables_linux_redhat-part1.php</p>

<p>in /etc/sysconfig there's a ton of stuff, including an iptables entry. The easy way to do this is to use:
system-config-securitylevel
and enable web... does it work? IT DOES!!!</p>

<p>Incidentally, to fix the garbled character issue, go to Putty and set the Terminal Translation to UTF-8. You can figure out what's going on by doing echo $LANG and echo $TERM on the Centos side to see what's up.</p>

<p>Now, there's the tricky part of actually being able to install packages on the VPC, which means it needs internet access. My Loopback Adapter.</p>

<p>To get rid of undefined network, set the loopback adapter gateay to the the host VPC
http://blogs.microsoft.co.il/blogs/baruchf/archive/2009/07/09/windows-7-amp-network-loopback-adapter-settings.aspx</p>

<p>I could set up internet sharing with the Loopback Adapter, or bridge them.
With Internet Connection Sharing (designed for sharing computer internet access with other people), I have to have the loopback adapter using DHCP and being on the same ip network as the internet connection. No thanks.</p>

<p>Bridging looks promising. Pull up Network Connections, select both connections (choosing Microsoft Loopback and Wireless Network Connection), then right-click and choose BRIDGE CONNECTIONS. Dialog pops up, and then I see a "connection status" thingy. However, this creates a NEW adapter, I think, that messes up authentication with ATT at SBUX. In fact, it all stopped working until I removed the bridge adapter.</p>

<p>The local network setup is 10.20.10.1 for the loopback adapter.
The server is set up as 10.20.10.100.
The Loopback Adapter has to have the VirtualPC filter enabled.</p>

<h2>Setting Hosts File so Apache can have VHosts</h2>

<p>I want to set the HOSTS file on Windows 7 to redirect a hostname (twentycentos.local) to 10.20.10.100.</p>

<p>Open Notepad.EXE with adminstrator prvilleges. 
%systemroot%\system32\drivers\etc\hosts</p>

<p>We can use this to create various VHOSTS for the local setup now as well. The contents of /etc/httpd/conf.d are automatically included in /etc/httpd/conf, so I created a vhosts.conf file, which now points a &lt;VirtualHost&gt; declaration that points to /var/www/vhosts/twentycentos.local/httpdocs</p>

<h2>Changing Network Configuration</h2>

<p>Before I had a single network adapter defined in VPC adapter 1, set to the Microsoft Loopback. I actually need to allow CentOS network access, so I am going to set adapter 1 to Shared (NAT), and then set the Loopback to Adapter 2. So I set that in VPC. Now I have to reconfigure the CentOS setup. <code>system-config-network</code></p>

<p>eth0 is set tp 10.20.10.100, but it fails
eth1 is doing dynamic, but it is also failing</p>

<p>I believe the issue is that eth0 is now associated with different hardware, so I change it to be DHCP (for the shared NAT on adapter 1), and then changed eth1 to use static IP.</p>

<p>Rebooting...did it work? This time the boot was clean! Now test if we can actually still reach 10.20.10.100 from the host OS...NOPE.</p>

<p>We can ping the 10.20.10.x network. We can't hit anything outside, though. Let's check iptables.
<code>system-config-securitylevel</code> and set eth1 to be trusted (it's the local 10.20.10.x network). eth0 is the internet at large, so we don't allow incoming.</p>


      ]]></content>
    </entry>


</feed>