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:
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.
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.
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.
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.
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.
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>’;
}
}
?>
“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.
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.
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.
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.
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!
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.
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);
}
}
?>
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.
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.