Where are the Libertarian TV Shows?

May 28 2009 | Economics | No Comments »

There’s only one tv show that promotes libertarian values that I know of and that’s Glenn Beck on Fox. The other is Judge Andrew Napolitano’s Freedomwatch, but that only airs as a webcast on Foxnews.com every Wednesday at 2pm EST at this address:

http://interactive.foxnews.com/livestream

If you haven’t seen his webcast then you should because it’s great! Libertarians everywhere! He has a website at freedomwatchonfox.com where you can watch archived video and podcasts of the show.

Here’s the latest episode on Youtube.

Part 1: 05/27/2009 Freedom Watch w/ Ron Paul, Tom Woods, Wayne Allyn Root, Schiff, Sam Dodson, more

Here’s Shelly with some tips on how to help promote Freedom Watch so it can get on the Fox News Channel (FNC):

Top 3 Ways to Get Freedom Watch on Fox News!

Governor of Texas Declares Sovereignty Under 10th Amendment

April 15 2009 | Economics | 2 Comments »

It’s happening. The revolt. Other states have similar legislation pending. The oppressive power of the federal government is hopefully coming to an end. If not, a civil war is a distinct possibility. Where do I sign up.

If you like Star Trek 2009 aka Star Trek 11 (XI), you might like this re-cut trailer I made with new music from the same composer!

March 26 2009 | Video | No Comments »

I took some music (”Asimov”) from the same composer (”Two Steps From Hell”) of the 3rd Star Trek 2009 trailer and re-cut the trailer to fit it.

Star Trek 11 fan made trailer

MARCH 25, 2009 - Freedom Watch on Fox with Glenn Beck, Judge Napolitano, Peter Schiff

March 26 2009 | Economics | No Comments »

MARCH 25, 2009 - Freedom Watch on Fox with Glenn Beck, Judge Napolitano, Peter Schiff

Representative Thaddeus McCotter for President

March 26 2009 | Economics | No Comments »

This guy has got to be the funniest congressman ever:

Peter Schiff Vlog Report 16 March 2009

March 16 2009 | Economics | No Comments »

I vote to impeach Obama, declare an emergency, and put Peter Schiff and Ron Paul in charge:

Peter Schiff on Lou Dobbs Radio (Jan.6th)

January 26 2009 | Economics | No Comments »

Excellent explanation by Peter Schiff on Lou Dobbs about what the problem is and how Obama is doing exactly the wrong thing.

John Stossel (ABC news) Blasts Politicians for Causing Financial Crisis

October 20 2008 | Economics | No Comments »

Just found this 6 part series of videos on youtube by John Stossel of ABC news explaining how Federal government interference causes so many problems in America, including the massive economic crisis happening right now.

Part 1

Part 2

The cause of the U.S. economic crisis - it’s not what you think

October 10 2008 | Economics | No Comments »

If you know Peter Schiff then you know his views on the cause of the U.S. economic collapse. If you don’t know his views and you think the cause is sub-prime mortgages then your wrong, the cause isn’t the mortgage thing, the cause is the we don’t make stuff any more thing. We don’t make stuff anymore, China does, Korea does, Japan does, Taiwan does. All we do is service each other. Services export about as well as buggy whips.

If you import everything and export nothing, what happens? Your income goes down. How do you fix this? Seems obvious, make stuff, make better stuff, make a lot of stuff. Nah, that’s too hard, just borrow the money. Why? Because the Federal Reserve told us to. How? By keeping interest rates so low it made credit insanely easy and cheap. Greenspan and Bernanke, current U.S. Federal Reserve Chairman, did what Bin Laden couldn’t do, destroy America.

The final nail in the coffin: liberals. The liberals suckered us into allowing Fannie Mae and Freddie Mac to lower their standards and start giving sub-prime people sub-prime mortgages. Eventually all these sub-prime people defaulted and that, my friends, is the ton of bricks that is now breaking the U.S. economies back. The mortgage problem wasn’t the cause, it was merely an accelerant, it would of happened anyway. Here’s Peter Schiff himself to explain:

Who to vote for, McCain or Obama? Which one can fix this? Neither. It doesn’t matter because the damage has been done and there is no undoing it. You just have to let the disaster happen then rebuild from the rubble. The important thing now is to get involved, no more apathy. Don’t trust anyone, especially politicians. Ask questions, let them know your watching. Learn all there is to learn about the cause of this and don’t repeat it. America will be back, in 5 years or so, better, leaner and definitely meaner. A little warning to anyone or any country who kicks us while we’re down or tries to take advantage of our temporary weakness: you will regret it because we won’t forget it.

Don “The Voice” LaFontaine Has Passed Away

September 03 2008 | Javascript and SimplePie | No Comments »

I’m sorry to hear Don LaFontaine, the voice on many movie trailers, has passed away. Here’s one well done trailer he did for Terminator 2:



don
More Don LaFontaine trailers

Video: A Motocross Screaming Mashup

August 31 2008 | SimplePie | No Comments »

Here is another short cool music video I made called Motocross Scream using a sound effect from the teaser trailer for Spiderman 3, some random motocross video clips from youtube, a song from Blackhawk Down by Hans Zimmer called Chant, and a scream from Slippage by Goldfrapp.



Got a lot of RSS Feeds: Which one is Bad?

August 19 2008 | SimplePie | No Comments »

If you have a lot of RSS Feed or Atom Feed links and you want to quickly check them all for load speed and errors, try:

Speed Feed - Rss Feed Checker

speed feed

How to Display RSS or ATOM Feeds Without Re-Loading the Web Page Using Javascript, AJAX, and SimplePie

August 12 2008 | SimplePie | 6 Comments »

Update: Version 2 adds the ability to have multiple feeds on the same page.

Download version 2 (multiple feeds): update_feed2.zip:

 

One day sbeaumont9 over at SimplePie’s tech support asked:

Has anyone implemented a SimplePie feed that updates automatically with AJAX? I’d like to be able to check for new content and have it update without a manual page refresh.

I said to myself, self, I know a little about this, I should do it, so I did. Hence, Update Feed was born. Catchy name.

 

The way it works

It’s simple. Javascript starts an interval timer. When the timer fires, an AJAX HTTP request is made to a PHP script on your server. That PHP script uses SimplePie to fetch and output your RSS or ATOM feed. The AJAX call receives that output and displays it in a DIV you designated — all without the user seeing anything happen except the feed being updated right before his or her or it’s eyes.

 

Instructions

To customize it, change the variables in the update_feed.js file global variables section (at the top).

 

var minutesBetweenUpdates = 1;

Change minutesBetweenUpdates to the number of minutes between AJAX calls to the SimplePie feed updater PHP script. Recommended: 60.

 

var feedUrl = ‘http://digg.com’;

Change feedUrl to the feed you want displayed.

 

var scriptUrl = ‘http://localhost/update_feed/update_feed.php’;

Change scriptUrl to the url of the update_feed.php script.

 

var cacheDuration = 0;

Change cacheDuration to the SimplePie cache duration you desire. Recomend: 3600.

 

var divId = ‘feedDiv’;

Change divId to the id of the DIV you want the feed html to display in.

 

var countDownTimerDivId = ‘countDownTimer’;

Optionally, if you want to dispay the countdown timer, change countDownTimerDivId to the DIV id where you want the timer to display.

 

Modify update_feed.php PHP script to format the RSS or ATOM feed as you desire.

 

Finished. Upload the update_feed folder to your web server.

 

Example usage

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>Demo: Update Feed using SimplePie and Ajax</title>
</head>

<body>

<h1>SimplePie Ajax Feed Demo</h1>
<h3>Digg</h3>

<div id="feedDiv" style="width:600px;height:200px;padding:1em;border:thin solid black"></div>
<div id="countDownTimer" style="width:600px;height:1em;padding:1em;border:thin solid black"></div>

<script type="text/javascript" src="update_feed.js"></script>

</body>
</html>

The javascript source code:

/**
 *
 * Update RSS/ATOM feed and display it using SimplePie and Ajax
 *
 *
 * LICENSE: This source file is subject to the BSD license
 * that is available through the world-wide-web at the following URI:
 * http://www.opensource.org/licenses/bsd-license.php.
 *
 * @author     Michael P. Shipley <michael@michaelpshipley.com>
 * @copyright  2008 Michael P. Shipley
 * @license    http://www.opensource.org/licenses/bsd-license.php BSD
 * @version    1.0
 * @link       http://www.michaelpshipley.com Michael Shipley
 */

/*
	Global variables
*/

// Set ajax update interval
var minutesBetweenUpdates = 1;

// Set feed url
var feedUrl = 'http://digg.com';

// Set url of PHP script that will fetch and return a feed or feeds using SimplePie
var scriptUrl = 'http://localhost/update_feed/update_feed.php';

// Set SimplePie cache duration (seconds)
var cacheDuration = 0;  // normally 3600

// Set div id where feed output will go
var divId = 'feedDiv'; 

/*
	Initialize feed display
*/
updateFeed(feedUrl,scriptUrl,cacheDuration,divId); 

/*
	Start feed update timer
*/

// Calc milliseconds
var seconds = minutesBetweenUpdates * 60;
var milliseconds = seconds * 1000;

// Setup function that feed update timer will call
var command = 'updateFeed(feedUrl,scriptUrl,cacheDuration,divId)';

// Start feed update timer
var updateFeedTimer = setInterval(command,milliseconds);

/**
	Use ajax to call  SimplePie to get feed data
	@param: feedUrl  string  feed link
	@param: scriptUrl string php script url
	@param: cacheDuration integer SimplePie cache duration in seconds
	@param: divId string id of div to output html to
*/
function updateFeed(feedUrl,scriptUrl,cacheDuration,divId)
{
	// Display the "updating" message
	var div = document.getElementById(divId);
	div.innerHTML = div.innerHTML + '<p>Updating...</p>';

	// Get the http requester
	if (window.XMLHttpRequest)
	{
		var http = new XMLHttpRequest();
	}
	else if (window.ActiveXObject)
	{
		var http = new ActiveXObject('Microsoft.XMLHTTP')
	}
	else
	{
		alert('browser doesn\'t support javascript http connections');
		return true;
	}

	// Process response
	http.onreadystatechange = function()
	{
		if(http.readyState == 4)
		{
			if(http.status != 200)
			{
				alert(http.responseText);
			}
			else
			{
				div.innerHTML = http.responseText;
			}
			return true;
		}
	}

	// Send http request via post
	params = 'url=' + feedUrl + '&cacheduration=' + cacheDuration;
	http.open("POST", scriptUrl, true);
	http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	http.setRequestHeader("Content-length", params.length);
	http.send(params);
	return true;
}

/*
	Start countdown timer (optional)
*/
var countDownTimerDivId = 'countDownTimer';
var date = new Date();
var timeOut = date.getTime() + milliseconds;
var timerId = document.getElementById(countDownTimerDivId);
var timer = setInterval(countDownTimer,100);
function countDownTimer()
{
	var date = new Date();
	var timeLeft = timeOut - date.getTime();
	if(timeLeft <= 0)
	{
		timeLeft = 0;
		timeOut = date.getTime() + milliseconds;
	}
	timerId.innerHTML = 'Seconds to next update: ' + parseInt(timeLeft/1000);
}

The PHP source code

<?php

// turn off browser caching (required to make AJAX work)
header("Cache-Control: no-cache, must-revalidate");
header('Pragma: no-cache');
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past

// retrieve POST parameters
$url = strip_tags($_POST['url']);
$cacheDuration = strip_tags($_POST['cacheduration']);

require ’simplepie.inc’;
$feed = new SimplePie();
$feed->set_feed_url($url);
$feed->set_cache_duration($cacheDuration);
$feed->init();

if($feed->error())
{
	echo ‘<p>’.$feed->error().’</p>’;
}
else
{
	foreach($feed->get_items(0,3) as $item)
	{
		echo ‘<a href="’ . $item->get_link() . ‘">’ . $item->get_title() . ‘</a>’;
		echo ‘<br>’;
		echo ‘<small>’.$item->get_date().’</small>’;
		echo ‘<br>’;
		echo ‘<br>’;
	}
}
?>

Don’t Mess With The Zohan Mashup

August 11 2008 | Video | No Comments »

I made fan vid mashup using clips from Don’t Mess with the Zohan. Check it out:

How to Keep Track of Which Links on Your Website are the Most Popular

July 30 2008 | Javascript | 6 Comments »

Once upon a time dng050 over at SimplePie tech support asked:

“I’m looking for a way to collect the most popular links on my page - what people are clicking on, something similar to the popurls.com “popular”. Could anyone with experience with this kind of task give me an outline of the possibilites, scripts…?”

I said to myself, self, I have no experience with that. I’ll do it. After a lot of research and work, it was done. When it was time to name it, I researched and thought long and hard. It had to be someting hip, yet not stupid. Finally it came to me: Click Counter. Ok 0 out of 2 isn’t bad. Ok it’s bad but — never mind.

Download it here: click_counter.zip

Requirements

PHP5, Javascript

How Click Counter Works

Click Counter uses Ajax (asynchronous JavaScript and XML) to detect clicks on links with a specific CSS class. When it detects a click it notifies a PHP script, via Ajax, that updates a simple fast text file database. No complicated MySQL database is required.

How to Install Click Counter

Upload the click_counter folder to your servers webroot. Done.

How to use Click Counter

1. Add a unique css class to all the link tags you want monitored

For example:

<a href="link.htm" class=”count”>Link text</a>

2. Insert click_counter script

Insert a script tag right before the </body> tag that loads the click_counter javascript. Insert that tag on all the web pages where you want to count link clicks.

Example:

<script type="text/javascript" src=”/click_counter/click_counter.js”></script>

Change the path to the script if you’ve uploaded the click_counter folder to a location other than your webroot.

3. Call cc_add_click_monitor

Call the click_counter function, ‘cc_add_click_monitor‘ with your unique class name. This will add onclick events to all your link tags that have the unique class name.

Example:

<script type="text/javascript">cc_add_click_monitor(”count”);</script>

Full Example

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Click Counter Usage</title>
</head>

<body>

<a href="link.htm" class="count">Link text</a>

<script type="text/javascript" src="/click_counter/click_counter.js"></script>
<script type="text/javascript">cc_add_click_monitor('count');</script>

</body>
</html>

That’s it! Every time you click on that link it will be recorded in the click database on your server.

How to display the click count stats

<?php

// load click counter class
require_once 'click_counter.php';

// instantiate a click counter class
$click_counter = new Click_Counter();

// initialize
$click_counter->init();

// get the database array
$click_db = $click_counter->get_db();

// show header

echo '<h3>Popular Today</h3>';

echo '<table>';

echo '<tr>';

echo '<td>';
echo 'Clicks';
echo '</td>';

echo '<td>';
echo 'Links';
echo '</td>';

echo '<td>';
echo 'Last clicked';
echo '</td>';

echo '</tr>';

// loop

$dayAgo = time() - (24 * 3600);
$found = false;
foreach($click_db as $url=>$click)
{
	// only display todays most popular clicks
	if($click['time'] < $dayAgo)
		continue;
	$found = true;
	echo ‘<tr>’;
	echo ‘<td>’;
	echo $click['count'];
	echo ‘</td>’;
	echo ‘<td>’;
	echo ‘<a href=”‘ . $url . ‘”>’ . $click['title'] . ‘</a>’;
	echo ‘</td>’;
	echo ‘<td>’;
	echo date(’H:i:s a’,$click['time']);
	echo ‘</td>’;
	echo ‘</tr>’;
}
echo ‘</table>’;

if(!$found)
{
	echo ‘<p>No clicks in the last 24 hours.</p>’;
}
?>

New! SimplePie Accelerator 1.0 Released to Manufacturing

July 12 2008 | SimplePie | 5 Comments »

Does SimplePie seem to take years to update it's cache? Then this free open source software is for you.


SimplePie Accelerator 1.0


SimplePie Accelerator uses space age technology to bring you unprecedented speed to your everyday household cache updating chores.

Example

  • Typical cache update time for 10 feeds: 13.722 seconds
  • Accelerated : 3.006 seconds

Demo
simplepie-accelerator-demo


Download
simplepie_accelerator.zip


Here is a list of the things SPA will do for you:

  1. Accelerate SimplePie cache updating by 3 times or more.

Actually that's it. Just one thing. Do one thing and do it well, I always say. And if I ever do that I'll let you know.

 

Requirements

In order to use SPA, your website must:

  • Run PHP5
  • Allow the PHP exec command.
  • Have WGET installed.
  • Be hosted on a Linux based server.

If your host doesn't support these essential features and your looking for maximum server power I recommend my host: RapidVPS. Disclaimer: I make no money if you sign up with them. Ok I lied. And remember, with great power comes great responsibility. I wouldn't recommend abusing the power of this server to create the world's first SZBN (SimpleZombieBotNet) API like I.. I mean, like one unfairly prosecuted, totally innocent person I know did. A federal judge in Connecticut, who I cannot identify because of that stupid gag order, will agree with me.

For a more economical yet still very capable website hosting solution you can try SimplePie.org's host, Dreamhost.

Numb

July 02 2008 | Music | No Comments »

Cool Computer Animated Israeli Dogfight Documentary

June 28 2008 | Video | No Comments »

Check out this really cool computer animated Israeli Air Force dogfight documentary I just saw on Youtube. It’s from the History channel. One of the most amazing parts was when one Israeli pilot, Giora Epstein, takes on 11 Migs all by himself and beats them all!

History - IAF Dogfights Part 2/2


Fix a bad feed date using SimplePie

June 22 2008 | SimplePie | 5 Comments »

Update: Added method that works in SimplePie Wordpress Plugin.

If you have a bad rss feed or atom feed date, here is a way to use SimplePie to fix it:

<?php
require_once 'simplepie.inc';
class 
FixDates extends SimplePie_Item
{
    function 
FixDates($feed$data)
    {
        
$this->feed $feed;
        
$this->data $data;
        
$this->fix_date();
    }
    function 
fix_date()
    {
        
$parsed $this->get_date('U');
        
//
        // put code to fix date here
        //
        // example: add one hour:
        
$newParsed $parsed 3600;
        
$this->data['date']['parsed'] = $newParsed;
        
$newRaw gmdate("D, d M Y H:i:s",$newParsed);
        
$this->data['date']['raw'] = $newRaw;
    }
}
$badDatesFeedUrl 'http://feeds.feedburner.com/Mashable';
$goodDatesFeedUrls = array(
    
'http://feeds.engadget.com/weblogsinc/engadget',
    
'http://feeds.boingboing.net/boingboing/iBag',
    
'http://feeds.feedburner.com/TechCrunch'
);
$fixedDates = new SimplePie();
$fixedDates->set_feed_url($badDatesFeedUrl);
$fixedDates->set_item_class('FixDates');
$fixedDates->init();

$goodDates = new SimplePie();
$goodDates->set_feed_url($goodDatesFeedUrls);
$goodDates->init();

$merged SimplePie::merge_items(array($fixedDates,$goodDates));

foreach(
$merged as $item)
{
    echo 
$item->get_link().'<br>';
    echo 
'<small>'.$item->get_date().'</small><br>';
    echo 
'<br><br>';
}
?>

SimplePie Wordpress Plugin

The following code is the method for fixing a bad date in a feed for the SimplePie Wordpress Plugin. This method only works with single feeds, not multifeeds. The reason for that is because there is no way to pre-process feeds in SPWP, only post-process. Therefore if you use this method for multifeeds, the items won’t display in the correct sort order.

In your call to SimplePieWP, add these options to your options array:

‘processing’=>’fix_date’
‘date_format’=>’U’

The ‘processing option’ tells SPWP to call the ‘fix_date’ process that will fix the date.
The ‘date_format’ option tells SPWP to format the date into the format fix_date needs.

<?php
echo SimplePieWP('http://www.missingkids.com/missingkids/servlet/XmlServlet?act=rss',
    array(
       
'processing'=>'fix_date',
       
'date_format'=>'U'
   
)
);
?>

Create a file named fix_date.php, insert the PHP code below, and upload that file to the processing directory which resides in the SPWP plugin directory.


<?php
/*    For: SimplePie Plugin for Wordpress
    Function: Fix wrong date
    License: BSD (http://www.opensource.org/licenses/bsd-license.php)
    Author: Michael Shipley
    Help: http://tech.groups.yahoo.com/group/simplepie-support/
*/
class SimplePie_PostProcess

    function 
item_date($date
    {
        
// fix date here. example adds 1 hour
        
$date += 3600// add one hour (3600 seconds)
        
return date('l, j F Y, g:i a',$date);        
    }
}
?>

RSS/ATOM Feed Analyzer

June 02 2008 | SimplePie | 2 Comments »

Check out my new Feed Analyzer.

All you do is enter an RSS or Atom feed URL (or simply a website URL and the feed URL will be auto-detected) and the analyzer, using SimplePie, will tell you everything you ever wanted to know about that feed but were afraid to ask. It answers questions like:

  • What is the effective feed URL?
  • What is the feed description?
  • Is the feed copyrighted?
  • Does the feed have a channel image?
  • Is the feed localized with a latitude/longitude data?
  • Do feed items have publication dates? (some don’t which can cause problems in multifeeds)
  • Does the feed’s corresponding website have a favIcon?
  • What is the feed’s title?
  • What is the feed’s source website link?
  • What type of feed is this? RSS? Atom? RDF?
  • What language is the feed in?
  • How is the feed encoded? UTF-8? ISO-8859-1?
  • Who is the author of the feed?
  • How many items are there in the feed?
  • How often are posts made?
  • What is the oldest feed item? (tells you how long your cache duration should be)
  • Are posts sorted by date? If so, are they sorted (reverse) chronologically?

In addition, the analyzer gives you:

  • A summary of all items in the feed.
  • A detailed list of all the items in the feed.
  • A list of all the sub-elements in an item element along with the required SimplePie code to extract those elements.
  • A dump of the raw HTTP data for the feed so you can visually check the feed’s HTTP headers and body for errors.
  • A demo of the feed.

Bonus:

  • Allows easy integration with Firefox’s feed subscription feature.
  • Validate the feed at FeedValidator.org.

SmartyPie: Feeding the Smarty PHP Template Engine with SimplePie

May 23 2008 | SimplePie | 2 Comments »

Here's a little demo showing how to use SimplePie with the Smarty PHP template engine.

<?php
require_once('simplepie.inc');
$feed = new SimplePie('http://simplepie.org/');
$titles = array();
foreach(
$feed->get_items() as $item)
{
    
$i['title'] =  $item->get_title();
    
$i['link'] =  $item->get_link();    
    
$i['date'] =  $item->get_date();        
    
$items[] = $i;
}
require(
'Smarty/Smarty.class.php');
$smarty = new Smarty();
$smarty->assign('items'$items);
$smarty->display('index.tpl');
?>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<ul>
{foreach from=$items key=myId item=i}
    <li>
    {$i.date} <a href="{$i.link}">{$i.title}</a>
    </li>
{/foreach}
</ul>
</body>
</html>

SimplePie Leaderboard

May 18 2008 | SimplePie | 2 Comments »

SimplePie Leaderboard is a PHP script using SimplePie that maintains and displays a leader board of feeds ranked according to the percentage of posts each make during a user designated time period.

Download leaderboard.zip

Demo

SimplePie Filter

May 06 2008 | SimplePie | 6 Comments »

Update: Enabled matches with words that contain quotes.

Update: Fixed a bug where the title wasn’t strtolower-ed.

Just uploaded a SimplePie addon called SimplePie Filter. It’s adds the ability to filter SimplePie items that match certain keywords.

Download: simplepie_filter-2.zip

Demo

Hello world!

May 02 2008 | Uncategorized | No Comments »

Yo, this is my personal website. More to come.