Michael Silverman documenting innovation at work

16Nov/110

Sending Text Messages with Perl and Google Voice

It is much easier to send a SMS text message with Perl than you might think. You wouldn't know unless you searched but there is a module out there called Google::Voice. The module allows you to use your Google Voice account from Perl. It's not installed by default with Perl so you will need to install it. The easiest way to do this would be to type

perl -MCPAN -e "install Google::Voice"

This will install Google::Voice and all of it's dependencies.

Now to write a text message is so simple!

use Google::Voice;

#Google login info
my $username    = 'myuser@host.com';
my $password    = "mypasword";

#text message info
my $send_number = "14443216789";
my $send_text   = "I'm a text message!";

#Do Not Edit Below Here!

#create Google::Voice object and login
my $gv_obj = Google::Voice->new->login($username, $password);

#send the text!
$gv_obj->send_sms($send_number => $send_text);

Now say you want to send a text message by calling the script from outside Perl.

14Nov/113

How to Create a WordPress Plugin

Mike Example Plugin admin page.

Before creating a plugin it's helpful to determine the tools you need for your plugin to function and then determine how to integrate them into WordPress. In this guide I will be teaching by example. The plugin we will be creating is a simple post text replacement plugin. In the WP Admin panel we will be able to modify the search and replace parameters. We also will have a replacement color and toggle color. After some planning I've determined this plugin will require the following:

  1. jQuery : We need jQuery to toggle the class on our replacement text when clicked.
  2. Database : We need our settings stored permanently. Of course you already have a database set up for WordPress. We will use that.
  3. CSS : We will use two stylesheets, one for the admin side and one for the client side.
  4. Custom Javascript: We're going to place our code in a separate file to show you how to load JavaScript on the admin side and the client side.

As mentioned before we want the plugin to have an admin panel accessible from the WordPress panel. We also need to hook into posts/pages for our search matching.
The following are WordPress documents that are essential for reference when creating a plugin. It will prove useful to have them bookmarked and opened in your browser at all times.

23Jun/1011

How To Create a New Device in EAGLE

deviceFinal

As you can see in my previous post I want to build a Nixie Clock. The tubes I have are model Z573M. I plan on designing a circuit, testing it, and having the final product manufactured. I only plan on making two clocks, but I want to do it professionally. The problem is, to my knowledge the Z573M does not exist as a part in any circuit designing program. So even for my initial schematic I was running into issues. I decided to use EAGLE because I've heard it's powerful, fairly easy to use, and they have a version that is freeware.

When you are creating a new part in EAGLE you may want to create a new library. This will make it easier to share your part, should you choose to do so.

To create a new library in EAGLE go to File > New > Library.