June 15
Quickly Check Crontab Path for Running Bash Scripts
sudo bash echo $PATH
Use output to update the PATH= line at the beginning of the desired crontab.
June 15
sudo bash echo $PATH
Use output to update the PATH= line at the beginning of the desired crontab.
May 24
"Version control backup with ISO 8601 date stamp in filename
set backup
set backupdir=$HOME/archive
set directory=$HOME/archive
au BufWritePre * let &bex = '_' . strftime("%Y-%m-%d") . '~'
December 31
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.
AH retains the recently created static, four-column layout in whites, browns, and reds. The site is largely run by a modified b2evolution engine with advertisements from blogads, Google AdSense, and others.
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.
Other features include:
December 27
If you wish to install a new font on Ubuntu Linux:
That is it. You should be able to select the new fonts from within all variable font applications on your linux box.
December 16
Food Journals for registered users of Accidental Hedonist 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 here.
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:
accidentalhedonist.com/username
Many thanks to Francesco Castronovo for the b2evolution autoblog plugin. 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.
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) here.
November 24
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.
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 Wikka Wiki. It has a cute, handy, and easy to implement word count action. 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.
However, my first love is MediaWiki. So I did a fair bit of digging and came across a reasonable little word count hack for MediaWiki page content. Thanks to Kishore Asokan.
MediaWiki Article Word Count
<?
// Getting the total words count
global $wgUser, $wgArticle, $db;
//check if its an article
if($wgArticle && !$_GET['action']) {
$c=$wgArticle->getContent();
$stripped= strip_tags($c);
$exploded=explode(" ", $stripped);
//you can print this variable anywhere you want on the page
$totalwords=count($exploded);
}?>
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.
I stuck it on a tab in the MonoBook skin and love it.
Here's how:
<?php
echo htmlspecialchars($tab['text']) ?></a></li>
<?php } ?>
</ul>
</div>
<li><font color="blue"> <?php echo $totalwords ;?> words </font></li>
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.
October 19
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.
Make a few edits.
Optional
Put the code on your web site. That can be done in several ways. The most common are:
August 22
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 Add to dictionary option as opposed to the correct spelling of restaurant.
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 persdict.dat. It is stored in the top level of Firefox profiles. If you also made this mistake and wish to fix it:
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.
Copy + Paste any text you were editing back into the original web page text field, and you're golden.
©2008 yoursite.com. All Rights Reserved. • Design by Free CSS Templates • Icons by FAMFAMFAM • Ported to Nucleus CMS by Suvoroff