Over the past couple of months I have started to really get into the habit of quickly dumping useful information or code snippets into Tomboy notes to save it for future use. I now use Tomboy for the majority of my note taking needs. I am very happy to get away from the notepad / gedit crutch. One issue that I faced is that I had some notes at home on my PC and other notes at work on my laptop. Thankfully, Tomboy notes has a nifty syncing feature that enables us to sync notes over SSH.
1. Create a directory on a server with SSH to host the notes
ssh tgeek@myserver.example
mkdir tomboy
2. Create an SSH key on each machine that you want to sync with and do necessary prep
ssh-keygen -t rsa
ssh-copy-id -i /path/to/keys/mynewkey tgeek@myserver.example
3. Download sshfs on each machine that you want to sync with
sudo apt-get install sshfs
4. Setup Tomboy to sync
4.1 In Tomboy, goto Preferences.
4.2 Click on the Add-ins tab and ensure that Synchronization -> SSH Sync Service Add-in is Enabled (if it is grayed out then it is disabled).
4.3 Click on the Syncronization tab.
4.4 For Service, choose SSH (sshfs FUSE)
4.5 Enter the credentials for your server that you setup in step 1.
ex. Server: myserver.example
Username: tgeek
Folder Path: /home/tgeek/tomboy
4.6 Click Save
I have this working in Ubuntu 9.10 and it is beautiful!
Mocha is written entirely in CakePHP and jQuery and is certainly the best CakePHP eCommerce app out there. Why do I say that?
Mocha Shopping Cart is…
If you still don’t believe me, Mocha is offering a limited time only Pre-Launch coupon code that gives you the first month FREE. You can try it for yourself and see how you like it. I think you will agree that it beats CakeCart and BakeSale, HANDS DOWN! And no, Mocha is not free (after the first 30 days). The costs help to speed up development, pay for server and hosting fees, and pay for that cup of coffee that us developers need when its 8 AM and we are having to talk with <insert_API_name_here> first thing in the morning.
Official Website: Mocha Shopping Cart
Blog with coupon code: Get a free trial of Mocha Shopping Cart
We had a client recently request that we embed an RSS feed from a different site inside their WordPress install. This would’ve been very easy considering there are 100’s of RSS feed plugins that will accomplish this task. However, they wanted to only display RSS items that had certain keywords in the title. My initial search found no WP plugins that currently were capable of this. I also tried one of the more popular ones, FeedList, but it used the get_rss() function in the WordPress API. For some reason, this function was not properly parsing the feed they wanted to use, most likely due to it not being a valid feed.
So to make a long story short: I decided to make a quick hack up solution and write my own WP plugin. My only hurdle-like requirement is that it had to work for PHP4 as well because the client is on one of our older servers. I ended up finding a really good example by Ryan Stemkoski. He wrote a perfect function for me to tweak a little and expand upon. I am currently waiting to get approved on WordPress extend so I can host my plugin there. For now, I have created a page here where you can download the plugin.
Note: I haven’t tested this in a more recent version of WP yet but I will be soon. Let me know if you find any bugs!
I also figured I would post the source code in case someone needed a quick and dirty solution with some examples.
rss_lib.php
<?php
/*
* RSS Parsing Function
*
* Original Author: Ryan Stemkoski
* http://www.stemkoski.com/how-to-easily-parse-a-rss-feed-with-php-4-or-php-5/
*
* Slight modifications by Jesse R. Adams (DualTech Services, Inc.)
*/
function parseRSS($url) {
//PARSE RSS FEED
$feedeed = implode('', file($url));
$parser = xml_parser_create();
xml_parse_into_struct($parser, $feedeed, $valueals, $index);
xml_parser_free($parser);
//CONSTRUCT ARRAY
foreach($valueals as $keyey => $valueal){
if($valueal['type'] != 'cdata') {
$item[$keyey] = $valueal;
}
}
$i = 0;
foreach($item as $key => $value){
if($value['type'] == 'open') {
$i++;
$itemame[$i] = $value['tag'];
} elseif($value['type'] == 'close') {
$feed = $values[$i];
$item = $itemame[$i];
$i--;
if(count($values[$i])>1){
$values[$i][strtolower($item)][] = $feed;
} else {
$values[$i][strtolower($item)] = $feed;
}
} else {
$values[$i][strtolower($value['tag'])] = $value['value'];
}
}
//RETURN ARRAY VALUES
return $values[0];
}
/*
* Convert Raw RSS Parse into concise list of items
*
* Optionally pass in limit (on number of items)
* and/or array list of words to grab items by.
*
*/
function extractRSSItems($xmlArray, $limit = null, $filteredWords = array()) {
$array = array();
$regex = null;
if (count($filteredWords) > 0) {
$regex = implode('|', $filteredWords);
}
foreach($xmlArray['rss']['channel']['item'] as $item) {
if (!$regex || ($regex && preg_match("/$regex/i", $item['title']))) {
$array[] = $item;
}
}
if($limit) {
array_splice($array, ($limit - 1), (count($array) - $limit));
}
return $array;
}
?>
selective_rss.php
<?php
/*
Plugin Name: Selective RSS
Plugin URI: http://techno-geeks.org/selective-rss
Description: Simple Plugin that allows you to embed RSS feed items into Pages or Posts. Optionally allows you to choose how many items to display and allows you to limit items to ones that contain certain words in the titles.
Version: 0.1.0b
Author: Jesse R. Adams (DualTech Services, Inc.)
Author URI: http://www.dual-tech.com/about-dualtech-services/
*/
require_once('rss_lib.php');
function filter_feeds($content) {
$limit = null;
$filter = array();
$url = null;
$inputTag = preg_match('/\[srss (.+)\]/', $content, $matches);
$rawArgs = explode(',', $matches[1]);
foreach($rawArgs as $input) {
preg_match_all('/^(url|filter|limit)=(.+)$/i', $input, $matches);
$key = $matches[1][0];
$value = $matches[2][0]
if ($key == 'filter') {
$filter = explode(';', $value);
} else {
$$key = $value;
}
}
if ($url) {
$xml = parseRSS($url);
$items = extractRSSItems($xml, $limit, $filter);
$htmlToAdd = '';
foreach ($items as $item) {
$htmlToAdd .= '<a href="' . $item['link'] . '" target="new">' . $item['title'] . '</a>' . "<br/>\n";
$htmlToAdd .= $item['description'] . "<br/><br/>\n";
}
$content = preg_replace('/\[srss .+\]/', $htmlToAdd, $content);
}
return $content;
}
add_filter('the_content', 'filter_feeds');
?>
Update 06/19: Fixed the way arguments are parsed to be less limiting on possibilities.

About a year ago Rick (http://www.rickguyer.com) had me read the book Getting Things Done by David Allen. In his book, Allen teaches you how to use his strategies and procedures on managing your tasks (or actions) in a very organized and well thought out fashion. His strategy is unique and calls for a very unique tool to accompany his GTD system. When I originally read his book, Rick and I spent several days searching for a different program, service, or web app that would allow us to incorporate Allen’s GTD system in an electronic fashion. After a solid week of effort I gave up after finding nothing that I felt was easy to use and completely GTD compliant.
Finally, after over a year, we decided to create this perfect GTD compliant web service that will help people, like us, be able to incorporate Allen’s system and become more productive. Peep! is “a simple and easy-to-use tool to help you focus and start getting things done.” I highly suggest you all try it and let me know what you think.
Head over to http://trypeep.com and get started today!