<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
    <channel>
    <title>Demented Kitty Misc.</title>
    <link>http://dementedkitty.com/</link>
    <description>Bedeviling Web Work</description>
    <language>en-us</language>           
    <generator>Nucleus CMS v3.51</generator>
    <copyright>&#169;</copyright>             
    <category>Weblog</category>
    <docs>http://backend.userland.com/rss</docs>
    <image>
        <url>http://dementedkitty.com//nucleus/nucleus2.gif</url>
        <title>Demented Kitty Misc.</title>
        <link>http://dementedkitty.com/</link>
    </image>
    <item>
    <title>VIM Configuration for Writers</title>
    <link>xml-rss2.php?itemid=13</link>
    <description><![CDATA[This article is not meant as defense for using vim as a writer's tool. Instead, it offers solid version control in a single backup directory. Each time vim is used to view or edit a file it creates a new backup file in the $home/archives folder. Each backup file includes an ISO 8601 formatted date stamp in the filename.

<ol>
<li># cd $home</li>
<li># mkdir archive</li>
<li>Edit .vimrc to include the following:
<blockquote>
"Version control backup with ISO 8601 date stamp in filename<br />
set backup<br />
set backupdir=$HOME/archive<br />
set directory=$HOME/archive<br />
au BufWritePre * let &bex = '_' . strftime("%Y-%m-%d") . '~'<br />
</blockquote>
</li>
</ol>

A few other .vimrc options to consider:

<ul>
<li>"Enable the backspace key to delete previous characters<br />
set bs=2</li>
<li>"As-you-type spell check usingdefault language dict if installed<br />
set spell </li>
<li>"Word wrap that only adds line break when you press Enter<br />
set formatoptions=1<br />
set lbr<br /></li>
<li>"Enable incremental search without case sensitivity except explicit caps<br />
set incsearch<br />
set ignorecase<br />
set smartcase</li>
<li>"Buffer scrolling<br />
set scrolloff=3</li>
</ul>]]></description>
    <category>General</category>
    <comments>xml-rss2.php?itemid=13</comments>
    <pubDate>Mon, 24 May 2010 09:55:55 -0700</pubDate>
</item><item>
    <title>Accidental Hedonist v9.1</title>
    <link>xml-rss2.php?itemid=2</link>
    <description><![CDATA[<p>This version of the Accidental Hedonist, the popular food blog, was mostly a new header. The absinthe lady returns in a transparency with a border fade near the bottom third of the picture. A new font with three-layer drop shadow was used for the name of the web site. Also, new, themed, colorized RSS buttons form a menu across the top.</p>

<center><a href="../media/AH_v91.png"><img src="../media/AH_v91_thumb.png" border="0"></a></center>

<p>AH retains the recently created static, four-column layout in whites, browns, and reds. The site is largely run by a modified <a href="http://www.b2evolution.net">b2evolution</a> engine with advertisements from <a href="http://www.blogads.com">blogads</a>, <a href="http://www.google.com/adsense">Google AdSense</a>, and others.</p>

<p>Several spam prevention techniques are used. E-mail spam is blocked by using a secure mail form for web site members and also a clever trap set for bots that collect e-mail addresses. Referrer spam is turned away via b2evolution's built-in blacklist. Comment spam is filtered by both b2evolution's built-in blacklist and a turing test plugin.</p>

<p>Other features include:</p>

<ul>
<li>polls (Democracy plugin)</li>
<li>written works status bar (custom code)</li>
<li>1-click RSS subscriptions (to web-based services such as <a href="http://www.bloglines.com">bloglines</a>)</li>
<li>user food journals (b2evolution, autoblog plugin, and custom code)</li>

<li>list of most recent user food journal posts (custom code)</li>
<li>simple print pages (custom code)</li>
</ul>]]></description>
    <category>Portfolio</category>
    <comments>xml-rss2.php?itemid=2</comments>
    <pubDate>Mon, 31 Dec 2007 12:20:00 -0800</pubDate>
</item><item>
    <title>Install New Fonts in Ubuntu Linux 8.10</title>
    <link>xml-rss2.php?itemid=3</link>
    <description><![CDATA[<p>If you wish to install a new font on Ubuntu Linux:</p>

<ol>
<li>Find the font you like and download the <i>.ttf</i> file. Select the <i>.tff</i> files and copy (ctrl+c) them to the clipboard.</li><br />

<li>Save anything you are working on and close all open applications.</li><br />
<li>Open your home folder with Nautilus (default file manager on default Ubuntu installations)</li><br />
<li>Click the <i>View</i> menu option and select <i>Show Hidden Files</i>.</li><br />
<li>Look for a folder named <i>.fonts</i>. Open that folder and paste (ctrl+v) the previously copied <i>.ttf</i> files into the <i>.fonts</i> folder.</li><br />

<li>Open your terminal of choice. On default Ubuntu installations the gnome-terminal is available under the main Applications > Accessories menu. Type of copy+paste the following and then enter your superuser password:<br /><br />sudo fc-cache -f</li><br />
<li>Allow your computer a few minutes to rebuild the fonts cache. A new terminal line with your username prompt will appear when the fonts cache is rebuilt.</li>
</ol>

<p>That is it. You should be able to select the new fonts from within all variable font applications on your linux box.</p>]]></description>
    <category>General</category>
    <comments>xml-rss2.php?itemid=3</comments>
    <pubDate>Thu, 27 Dec 2007 12:23:00 -0800</pubDate>
</item><item>
    <title>Accidental Hedonist User Journals</title>
    <link>xml-rss2.php?itemid=4</link>
    <description><![CDATA[<p>Food Journals for registered users of <a href="http://www.accidentalhedonist.com">Accidental Hedonist</a> are now active. All new users will be asked if they wish to create a blog on Accidental Hedonist during registration. This makes Accidental Hedonist into a sort of food blog network. If you are not a registered user on Accidental Hedonist and wish to sign up, please go <a href="http://www.accidentalhedonist.com/htsrv/register.php">here</a>.</p>

<p>If you opt to create a new blog, your username will be used in the blog's address. Please choose your username accordingly. Food journal addresses will look something like:</p>

<p>accidentalhedonist.com/username</p>

<p>Many thanks to Francesco Castronovo for the <a href="http://www.fralenuvol.com/albero/servizi/webmaster/scripts/b2evolution_autoblog_plugin.php">b2evolution autoblog plugin</a>. I had to (and likely will continue to) hack it quite a bit for use as Kate wished on this site. However, it provided a very useful starting point.</p>

<p>I am still working out the bugs, but basic blog creation, posting, editing, and all that good stuff works reasonably well. I'm documenting changes to the live software (but not the changes I'm testing) <a href="http://www.accidentalhedonist.com/changelog">here</a>.</p>]]></description>
    <category>Portfolio</category>
    <comments>xml-rss2.php?itemid=4</comments>
    <pubDate>Sun, 16 Dec 2007 12:25:00 -0800</pubDate>
</item><item>
    <title>MediaWiki Word Count Tab</title>
    <link>xml-rss2.php?itemid=6</link>
    <description><![CDATA[<p>My National Novel Writing Month project just passed the 40k mark, and I find that I'm in need of a little structure. I know basically what I want for my final two 5k chapters. I have to line a few ducks first, though.</p>

<p>I slowly started putting everything into a wiki last week. Then, yesterday, when I crossed the 40k word barrier, I sped up the process so I could finish. At first I went with <a href="http://wikkawiki.org">Wikka Wiki</a>. It has a cute, handy, and easy to implement <a href="http://wikkawiki.org/WordcountAction">word count action</a>. Copy the code. Paste it into a new document. Name the document and upload it to the right directory. Done. Wikka Wikki has ease of plugins down to a science.</p>

<p>However, my first love is <a href="http://www.mediawiki.org">MediaWiki</a>. So I did a fair bit of digging and came across <a href="http://kish.in/27/mediawiki_article_word_count">a reasonable little word count hack for MediaWiki page content</a>. Thanks to Kishore Asokan.</p>

<blockquote>
<p><b>MediaWiki Article Word Count</b><br />
<code><br />
&lt;?<br />
// Getting the total words count<br />
global $wgUser, $wgArticle, $db;<br />
//check if its an article<br />
if($wgArticle &amp;&amp; !$_GET['action']) {<br />

$c=$wgArticle->getContent();<br />
$stripped= strip_tags($c);<br />
$exploded=explode(" ", $stripped);<br />
//you can print this variable anywhere you want on the page<br />
$totalwords=count($exploded);<br />
}</p>

<p>?&gt;<br />
</code></p></blockquote>

<p>I played with the code a bit, but eventually left it as it was. The code is not perfect. It doesn't give an exact word count, but neither do most word processors. What I get is a very reasonable estimate.</p>

<p>I stuck it on a tab in the MonoBook skin and love it. </p>

<p>Here's how:</p>

<ol>
<li>Download and install <a href="http://www.mediawiki.org">MediaWiki</a>, if you haven't already.</li><br />

<li>Assuming you use the MonoBook skin for MediaWiki, open: skins/MonoBook.php</li><br />
<li>Around line 124, find: <blockquote><p><code>&lt;?php<br />
					 echo htmlspecialchars($tab['text']) ?&gt;&lt;/a&gt;&lt;/li&gt;<br />
&nbsp; &nbsp; &lt;?php	&nbsp; &nbsp; &nbsp; &nbsp;  } ?&gt;<br />

&nbsp; &nbsp; &nbsp; &nbsp; &lt;/ul&gt;<br />
&nbsp; &nbsp; &lt;/div&gt;</code></p></blockquote></li><br />
<li>Insert two line breaks immediately after &lt;?php			 } ?&gt; but before &lt;ul&gt;.</li><br />

<li>At the first new line break, copy and paste the MediaWiki Article Word Count code above.</li><br />
<li>At the second new line break, add a little formatting and a label to fit the word count into a cute, little tab:<blockquote><p><code>&lt;li&gt;&lt;font color="blue"&gt;&amp;nbsp; &lt;?php echo $totalwords ;?&gt; words &amp;nbsp;&lt;/font&gt;&lt;/li&gt;</code></p></blockquote></li><br />
<li>Save the skins/MonoBook.php file and upload it to your server.</li>
</ol>
<p>When you finish, there should be a word count tab at the top of every article page. Some special pages will show the word count tab as well.</p>]]></description>
    <category>General</category>
    <comments>xml-rss2.php?itemid=6</comments>
    <pubDate>Sat, 24 Nov 2007 12:33:00 -0800</pubDate>
</item><item>
    <title>NaNoWriMo Progress Bar</title>
    <link>xml-rss2.php?itemid=8</link>
    <description><![CDATA[<p>This is a quick and dirty php and css progress bar. Technically, the code could be used as a progress meter for almost anything (rebuilding a car, stock kept in a pantry, whatever). Consider this code freeware and use it as you wish.</p>

<ol>
<li>Right-click <a href="../media/book_progress_1.txt">this file</a> (it's plain text, so no virus worries) and save it to your documents folder or desktop.</li><br />
<li><p>Make a few edits.</p>
<ul>

<li>Change the text in quotes after book_title from "My NaNoWriMo" to "The Title of Your Book". Be sure the quotes, equal sign, and semicolon remain. Edit only the text between quotes.</li>
<li>Change the zero after book_current_wordcount to match your NaNoWriMo book's current word count. Update that number as often as you like. Remember that, unlike the book title variable, the number after book_current_wordcount does not require quotes. The semicolon must remain though.</li>
<li><p>Optional</p>
<ul>
<li>Change the word meter's border in the style section. The color code is just below the CSS comment: Change border color here</li>
<li>Change the color of the word meter itself in the style section as well. The color code is just below the CSS comment: Change progress bar color here</li>
</ul></li></ul>
</li><br />
<li><p>Put the code on your web site. That can be done in several ways. The most common are:</p>
<ul>
<li>Copy+paste your modified code (with the name of your book, etc.) into a spot on your blog's sidebar. Add a header if you like.</li>

<li>Save the code as book_progress_1.php (or a similar name), upload the file to your server in the same place as your other template files, and <a href="http://us2.php.net/include/">include</a> book_progress_1.php in your sidebar: <code><?php include ('book_progress_1.php'); ?></code></li>
</ul>
</li>
</ol>]]></description>
    <category>General</category>
    <comments>xml-rss2.php?itemid=8</comments>
    <pubDate>Fri, 19 Oct 2007 12:44:00 -0700</pubDate>
</item><item>
    <title>Personal Spelling Dictionary in Firefox 2</title>
    <link>xml-rss2.php?itemid=9</link>
    <description><![CDATA[<p>I was half asleep, sipping my first cuppa, and misspelled restaurant while typing in a text field. Okay, that's no big thing. I right click and... Doh! I selected the <i>Add to dictionary</i> option as opposed to the correct spelling of restaurant.</p>

<p>No worries. I did a little digging and found that the personal dictionary for the spell check engine used by Firefox 2 is a flat text file named <i>persdict.dat</i>. It is stored in the top level of Firefox profiles. If you also made this mistake and wish to fix it:</p>

<ol>
<li>Copy and paste these instructions to a handy text editor or print them. If you were editing something important before adding the wrong spelling of a word to your dictionary and you still have that web page open, copy and paste that text to a text editor as well.</li><br />
<li>Close Firefox 2. FF2 must save new words to the <i>persdict.dat</i> file before you may edit it. That save is done after Firefox 2 is closed.</li><br />
<li>Find your Firefox 2 profile. Default locations are usually as follows.<br />
<ol type="a"><br />

<li>Windows XP/2000: C:\Documents and Settings\[User Name]\Application Data\Mozilla\Firefox\Profiles\</li><br />
<li>Windows Vista: C:\users\[User Name]\AppData\Roaming\Mozilla\Firefox\Profiles\</li><br />
<li>Windows 95/98/Me: C:\WINDOWS\Application Data\Mozilla\Firefox\Profiles\</li><br />
<li>Linux: ~/.mozilla/firefox/</li><br />
<li>Mac OS X: ~/Library/Application Support/Firefox/Profiles/</li></ol></li>
<p></p><li>Open your profile folder. Depending on your installation, the folder may bear your user name. If it doesn't, look for a folder with a name scheme similar to <i>xxxxxxxxx.default</i>.<br /><br /></li>
<li>Find the file named <i>persdict.dat</i> and open it with a text editor.<br /><br /></li>

<li>Delete the incorrectly added word.<br /><br /></li>
<li>Save the <i>persdict.dat</i> file and close it.<br /><br /></li>
</ol><p></p>

<p>That's all there is to it. Reopen Firefox 2 when you're finished and the incorrect spelling will be gone from FF2's spell checking dictionary.</p>

<p>Copy + Paste any text you were editing back into the original web page text field, and you're golden.</p>]]></description>
    <category>General</category>
    <comments>xml-rss2.php?itemid=9</comments>
    <pubDate>Wed, 22 Aug 2007 12:48:00 -0700</pubDate>
</item><item>
    <title>b2evolution skin: l33t_gray</title>
    <link>xml-rss2.php?itemid=11</link>
    <description><![CDATA[<p>Winner of the <a href="http://b2evolution.net/news/2004/07/16/evoskins_competition">2004 evoSkins Competition</a>.</p>

<p><a href="../media/l33t-gray.png"><img src="../media/l33t-gray_thumb.png" border="0"></a></p>
]]></description>
    <category>Portfolio</category>
    <comments>xml-rss2.php?itemid=11</comments>
    <pubDate>Sat, 18 Jun 2005 12:51:00 -0700</pubDate>
</item>
  </channel>
</rss>