Archive for category Code

iGipper

Note: This app is currently pending approval from Apple.

Your discussion. His witty retort.

iGipper lets you bring Ronald Reagan and his most famous line with you.

Launching iGipper gives you a Ronald Reagan button which randomly plays one of two recordings of “The Great Communicator” himself saying “There you go again!”

The first recording was taken from Reagan’s 1980 debate with incumbent President Jimmy Carter. The other recording is from his 1984 debate with Walter Mondale.

This app is for Reagan fans by a Reagan fan. If you’ve ever found yourself saying “What this country needs is another Reagan!”, this app is for you.

Technically speaking, this app takes advantage of iOS 4′s high resolution graphics. The included recording have been optimized for the iPhone’s loud speaker as well as slightly modified to remove longish pauses or distracting noises.

Support

Leave a comment below or email me: clifgriffin[at]gmail.com

Screenshots

No Comments

Disable RSS Plugin for WordPress

Find a bug?

If you believe you have found a bug, please open a ticket here. This will allow me to track the issue as a single issue and others to comment and give feedback.

I’m finding it difficult to discern user error from bug from configuration differences among different installations. All of this will lead to a quicker turn around for reported issues. Isn’t that cool?

If you're feeling generous.

Official WordPress Link

Smashing Magazing did a post today including several RSS related WordPress hacks.   One of them featured a method to disable all RSS feeds. As they say: 

“Let’s say you’re using WordPress as a CMS to manage your online portfolio or your company’s website. In such cases, the RSS feed isn’t that useful, and some people would probably want to remove it.”
 

Notably, they did not encapsulate the functionality in a plugin. So I will be converting the ones without a associated plugin into plugins over the coming days. This is the first one.

Simply put, all you have to do is upload the plugin, activate it, and viola! No more RSS feeds. You can edit the error message users receive by editing the actual plugin file. (disable-rss.php)

The code:

add_action('do_feed', 'fb_disable_feed', 1);
add_action('do_feed_rdf', 'fb_disable_feed', 1);
add_action('do_feed_rss', 'fb_disable_feed', 1);
add_action('do_feed_rss2', 'fb_disable_feed', 1);
add_action('do_feed_atom', 'fb_disable_feed', 1);
 
function fb_disable_feed() {
	wp_die( __('No feed available,please visit our <a href="'. get_bloginfo('url') .'">homepage</a>!') );
}

Download Disable RSS 1.0 for WordPress 2.7-RC1 Now…
Disable RSS 1.0 for WordPress 2.7-RC1

, ,

39 Comments

Converting HTML to a C# String

Today I was working on a project where it became useful to convert an HTML file into two C# strings.  As I only intended to do this one time, I opted to not do all of the string replacements necessary and decided to look for someone else who had already done the heavy lifting. 

In short time I found a singularly useful tool to do exactly what I needed.   The tool is named HTML To C# String and is published as an open source project under the GPL (or MIT) license. (it isn’t extremely clear which)

It's simple.

It's simple.

The only limitation I found was that this project does not preserve whitespace or line breaks. That’s not a problem if you’re dealing with simple html, but if you have anything fancy–like javascript, you might run into troubles. For example this:

var something = "This is such a cool var!"; //A comment about this var
var somethingElse = "blah";

becomes this:

var something = "This is such a cool var!"; //A comment about this var var somethingElse = "blah";

This will obviously not work.  I converted his project (which is only a few lines of code) into a Visual Studio 2008 project and tweaked it slightly.  You can download the result below.  I did not compile it with a setup as this utility is too simple to warrant an installation in my humble opinion.  Just run the executable in bin/Release. 

Download it now…
HTML To C# String-Mod

,

1 Comment