The Tech Diary

Your Online Notebook!

Tech Diary

Journal your struggles and achievements with technology.

FreeBSD watchdog

Posted by: Brad Waite

Tagged in: Untagged 

FreeBSD supports watchdog timers in the kernel.  If a timer is set, and not reset or disabled within the specified time, the kernel can reboot the machine.

'watchdog -t ' starts a watchdog for n seconds. Runing watchdog(8) again in again in <n seconds, resets the timer. If 'watchdog -t 0' is run, the kernel disables the watchdog.

watchdogd(8) either runs stat(2) on /etc, or a user-defined cmd (with -e), and resets the watchdog only on a zero exit code.

Examples:

"watchdog -t 90" sets a new watchdog timer for 90 seconds.

"watchdog -t 0" unsets the timer.

 

 


Capture smtp email from command line with tshark

Posted by: Brad Waite

Tagged in: Untagged 

tshark -i em0 -f"host 127.0.0.1 and port 25" -R"smtp"

mavik Thumbnails

Posted by: Brad Waite

Tagged in: Untagged 

mavik Thumbnails is a simple plugin for Joomla! that automatically creates thumbnails for any and all images in your content.  Just like any other Joomla plugin, it's simple to install and configure.  However, I struggled for hours to get it to work, particularly with MyBlog for use here on Tech Diary.  Turns out it was working exactly like it was supposed to and I didn't know it.

 Here's how to use it:

  • Install & enable mavik Thumbnails
  • Insert an image into your content using the standard Joomla! editor method.  You can upload the image in the editor or use the Media Manager.
  • Resize your image in the editor to the size you'd like like thumbnail to appear.

When you view the content, you'll see the smaller "thumbnail" image, just like it would appear without this plugin.  However, the thumbnail is now linked to the original full-sized image.  You configure whether the full-sized pic opens up in Slimbox, Highslide or a Joomla! Modal pop-up.

My struggles were two-fold:

  1. I was using my frontpage as the test
  2. I was using MyBlog entries to test

In both of these test cases, the smaller thumbnail would show up properly, but was not linked to the original image.

In the case of 1, it turns out that mavik Thumbnails is set to NOT link to the original image when the content is displayed on the frontpage.  If you view the article itself, the thumbnail link automatically appears.  In a way, this makes sense, although I would have liked a heads-up about this "feature".

For 2, I had to publish the mavik Thumbnails plugin in the Content Mambots Integration section of the MyBlog configuration page.

I think the author assumes it to be intuitive, and maybe for other people it will be, but in my case, it was an exercise in frustration.

In my searches I also found FBoxBot, which does much the same thing, but adds a little magnifying glass to the lower-right corner of the image.  If you'd like some to give the use indication they can click on the image, this one might be a better choice for you.


CSV Improved for Joomla 1.5

Posted by: Brad Waite

CSV Improved for Joomla 1.5 is the fastest and best way to quickly and easily populate your Joomla 1.5 VirtueMart store.

We're setting up several new web stores that will be selling a variety of items.  VirtueMart is the most popular e-store / shopping cart component for Joomla 1.5 and I've used it a number of times in the past.  After spending a few years fighting with osCommerce, VirtueMart is an absolute thrill to implement.

CSV Improved VM New ProductOnce VirtueMart is set up, the first challenge is entering all of the products we wish to offer for sale.  If you're running a small store with only a handful of products, doing this by hand via VirtueMart's native interface is pretty simple.  If you've got hundreds, or even thousands of products, this would be a tiresome and tedious chore.

Fortunately, a number of our distributors with whom we're working supplied us with their product listings in CSV format.  I'll explain more about this file format later, but this allows us to import an entire catalog into our new store in just a few steps using another Joomla! component called "CSV Improved".  If you read the reviews of CSV Improved on Joomla's extensions site, you'll notice two things that nearly every reviews says:

  1. CSV Improved is THE tool to do what we're attempting.
  2. CSV Improved has a HUGE learning curve.

Since none of the alternatives were appealing, I decided to dig into CSV Improved and see how hard it really is.  I download and installed the 30-day trial and then headed over to the documentation.

I've worked with hundreds of third-party add-ons for various open source programs, and I found CSV Improved's documentation to be one of the most lacking examples I've encountered.  While I'll give CSV Improved's author credit for using a wiki to document his project, the examples and tutorials aren't very straightforward and there are NO pictures.  Of course I'm well versed in the English language (which appears to be a secondary language for the author), but when explaining how something works on the computer, a picture truly is worth a thousand words.

So I figured I'd take this opportunity to make a few journal entries here on the Tech Diary chronicling my learning process with CSV Improved.   My aim is to provide simple, easy-to-follow instructions on how to get CSV Improved fully up and running.

I'm doing it here on Tech Diary for a couple of reasons.  First, the Tech Diary is a place where I can keep track of the various projects I'm working on.  If I record everything here, I'll always know where to go when I have to do it again.  Second, I'm hoping that this will be a resource for other VirtueMart and CSV Improved users that might be initially discouraged by its apparent difficulty to use.  By the end of the tutorial you'll be an expert at using CSV Improved for Joomla 1.5.


Web Page Screen Grabs / Screen Captures

Posted by: Brad Waite

Tagged in: Untagged 

Since the purpose of this blog is to document things I'm working on (both for my sake and yours), using screen grabs (also called screen captures) is a great way to simplify any process.

Windows has a built-in method for capturing a window's contents as an image.  CTRL+PrintScreen will copy the currently active window to the clipboard.  You can then paste the image into any image editor, modify it as necessary and save it.  Probably the most common edit I do is cropping the image to show just the bits of the screen I care about.

Since a fair bit of what I'm sure I'll be documenting is web-based, I'll need to grab pictures from web sites.  There's a cool utility I just found that allows me to capture directly from Firefox.  The add-on is called Screengrab! and is a breeze to use.  You can capture either the entire page, the visible portion of the page.  Even more handy is the ability to select a portion of the page - no more cropping in an external editor!  You have the option to copy it to the clipboard (if you still need to do edits or want to paste it into some other program), or save it directly to your computer as a PNG file.

Pretty doggone cool if you ask me.  Check it out!


Implementing MyBlog on Joomla!

Posted by: Brad Waite

Tagged in: Tech Diary , myblog , Joomla , Community Builder

Well, it appears that I've successfully installed MyBlog on the Tech Diary.

The installation was fairly standard, although it's not intuitive how to give users access to the blogging capabilities.  The last install of MyBlog I did was on Joomla! 1.0.x with Community Builder already installed.  I may install CB here, but time constraints prohibit that at this time.

The default install should create a item in the default User Menu to each user's blog.  Since I didn't have a User Menu set up, it wasn't created.  Time to figure out how to manually add that.  To add it, I created a new menu item called "UserMenu" in the Menu Manager, then went to the Maintenance tab in MyBlog admin and clicked "Fix dashboard link".

Further updates as events warrant.


  • «
  •  Start 
  •  Prev 
  •  1 
  •  2 
  •  3 
  •  Continue 
  •  End 
  • »