Amazon.com Widgets
18
Nov

Sometimes the Cisco OIP program can be a pain in the ass!

Another partner registers the deal. You are awarded the business, taking less margin than the behemoth vendor in town, to get the deal. Now you’d like to increase your margins and you aren’t able to get the best pricing because behemoth vendor has protected pricing.

Kinda makes for an unfair advantage, and prohibits Cisco’s other partners from growing their business. Keeping the big guy in town big and the small guys small.

My suggestion, OIP Rebate program. When the deal is registered by someone else, but I am awarded the business. I should get that OIP discount as a rebate check.

Come on Cisco! Help your partners grow!

, , ,

08
Nov

ExpertsExchange has a complete redesign! Looks great guys! Can’t wait.

Small Experts Exchange VIP Badge

, ,

27
Oct

Good article over at Network World about Patents Microsoft has claimed to hold. I’ve blogged about the silliness of patents like this in the past. People at the patent offices must be not tech savvy. I would NEVER have let such vague patents be allowed through.

Check some of them out: The Microsoft/Android war: Which patents are at stake?

, , , ,

04
Oct

I had a need to build an array of months between a set month and the current month. My purpose was to let the user choose a month to build a report for.

I’m using HTML::Mason, but you get the idea.

You’ll need Date::Manip::Recur


<select name="months" id="months">
% # Loop through the date objects
% for (@dates) {
%   # Assign the current month value to a scalar.
%   my $curMonth = $_->value();
%   # I only cared to see YYYYMM so I regex'd it.
%   $curMonth =~ s/^(\d{4})(\d{2}).*$/$1$2/;
      <option value="<% $curMonth %>"><% parseMonth($curMonth) %></option>
% }
</select>

<%init>
# Returns a date like "2011-01-01"
my $monStart = getOldestEntry($account);

use Date::Manip::Recur;
  my $recur = new Date::Manip::Recur;
  # Parse out the first of the month for every month since start until today.
  my $err = $recur->parse('0:0*0:0:0:0:0',$monStart,$monStart,"Today");
  # Return an array object of dates
  my @dates = $recur->dates();

sub parseMonth {
use Time::Local;
use Date::Format;
  my $md = shift;

  # Match on YYYYMM
  $date =~ m/^(\d{4})(\d{2})/;
  my $year = $1; my $mon = $2;

  # Convert to epoch
  my $time = timelocal(0,0,0,1,$mon-1,$year);

# Return back (%B %Y) as "August 2010"
return(time2str("%B %Y", $time));
}
</%init>

, , , , ,

02
Oct

My 4-Stroke Ryobi S430 Weed Trimmer has been great, I’ve not had problems like others have had with their, except it leaks gas on my right arm my from the fuel cap breather while I’m weed eating.

I haven’t hung it up in my garage because when I do, it constantly drips fuel out. I’m about to see if I can find a non-vented cap for storage, so I can hang it up without leaking. I know it needs the breather to run. I kinda wish I spent more money for a better built unit.

Any ideas?

, , , , , ,

29
Sep

Amazon just released a video with their new idea on web browsing. They’re going to implement it with the new Kindle Fire edition. It sounds pretty cool, but what about privacy? Amazon filtering your internets??

, , , ,

27
Sep

I needed to quickly generate a full directory for a receptionist console. Since Trixbox doesn’t do this, I wrote some Perl to do so. It’s pretty simple, you will need to install Polycom::Contact::Directory from CPAN. It will connect to the localhost MySQL server and pull all extensions out, make an xml and save it to the appropriate path. You will need to supply the MAC address, I guess I could modify a bit to pull the MAC out of the Endpoint Manager table, but I like being able to just supply the MAC.

Thanks Zachary Blair for the easy module!


#!/usr/bin/perl -w
# Quick script to hack out a directory for a mac address. I use it for the
# receptionist's BLF on her IP650 with sidecars.
use strict;
use Polycom::Contact::Directory;
use DBI;

# Grab the MAC address from ARGV and make a file
my $mac = $ARGV[0] or die "No MAC Specified\n";
my $contactFile = "/tftpboot/polycom/contacts/$mac-directory.xml";

# Create a new Empty Directory
my $dir = Polycom::Contact::Directory->new();
# Connect to the trixbox MySQL DB
my $dbh = DBI->connect('dbi:mysql:asterisk:localhost:3306','root','passw0rd',{ RaiseError => 1});

# Pull an array ref for the extensions
my $userAry = $dbh->selectall_arrayref("SELECT extension,name FROM users ORDER BY extension");

$dbh->disconnect();

# Set counter for speed dial index
my $x = 1;

# Loop through extensions
for my $a (@$userAry) {
# Split the trixbox name into first and last.
my ($fn,$ln) = split(/\s+/,$a->[1],2);

# My contacts are generally dirty, I'll make them look better. Some people may want
# to comment this out if you have people with unique capitalization.
$fn = ucfirst(lc($fn));
$ln = ucfirst(lc($ln));

# Insert the record into the object.
# I like the labels to be: extension firstname lastname "3721 Awesome Dude"
#  -- buddy_watching lets the polycom monitor BLF status. For this to work,
#     you must have feature.1.name="presence" feature.1.enabled="1" in
#     /tftpboot/sip.cfg
#  -- Check Polycom::Contact Documentation for Options
$dir->insert(
{   first_name => $fn,                  # <fn> in xml
last_name  => $ln,                  # <ln> in xml
contact    => "$a->[0]",            # <ct> in xml
label      => "$a->[0] $fn $ln",    # <lb> in xml
buddy_watching => 1,                # <bw> in xml
speed_index => $x,                  # <sd> in xml
buddy_block => 0,                   # <bb> in xml
auto_divert => 0,                   # <ad> in xml
auto_reject => 0,                   # <ar> in xml

},
);
$x++;
}

# Save the contact file.
$dir->save($contactFile);

1;

, , , , ,

22
Sep

Oracle sues Google over Android and Java | Relevant Results – CNET News.

Wow, I must have missed this news. Not sure how I feel. IMHO programming languages should be free and open. You can make your own IDE and sell it, but really the right to use the language should be free, or even in the case of Java, sell your VM to people.

Maybe I’m not well versed enough on the whole ordeal. Any insight anyone?

, , , , , ,

18
Sep

My parents got me a Kindle, Wi-Fi, 6″ E Ink Pearl Display for my birthday today. They also picked it up with a Kindle Leather Cover, which is a VERY nicely made leather cover. I’m not sure I’d want the lighted one, but I will enjoy it. The Kindle was a snap to get setup and registered. Now I just have to finish the paper books I’m in the middle of so I can get to reading on the Kindle. My dilemma: Rebuy paper books on the kindle and “amazon store” the old ones? Or finish reading my paper books and then sell and buy new E-Books?

Also to test.. PDFs! I’ve got a ton of Manuals on pdf i’d like to convert to the Kindle.

Another nice thing I noticed.. Amazon gives away Free Classics!! AWESOME!

Oh here’s an awesome video I came across. Looks great fullscreen!

, , , , , , ,

29
Aug

Updated the corporate website today to include memcached. It was hitting our legacy application’s MSSQL database (which we have to still use), a ton, and slowing down the *choke* windows application.

Anyways, memcached saved the day! Way less hits on the database, and only took a few simple hooks to implement! I know I could have used Mason’s cache, but it isn’t distributed across servers that were not on this web server.

We use HTML::Mason for the site, so just a few simple hooks did the job.
1) Preloaded the Cache::Memcached module into my mod_perl.
2) Most of the website is driven off part number lookup. Even non parts are actually parts in our database, but just have content associated with them. So in the part retrieve Mason page, I added a line to load up memcached.

my $memd = new Cache::Memcached {
'servers' => [ "10.10.1.44:11211", "10.10.1.40:11211" ],
};

I get a $pn variable in from all other places so I check for its existence in the cache.

$mPart = $memd->get($pn);

Then just add a hook around my standard DB call and then a set after the pull and assign if we hit an else.

if (!$mPart) {
$partList = $dbh->selectrow_arrayref("SELECT blablabla from priceBook WHERE itemID = '$pn'");
$memd->set($pn,$partList,600); # Expire cache at 10 minutes (600 seconds).
} else {
$partList = $mPart;
}

, , , , , , ,

  • Search:
  • EE V.10!

  • Mikedaddy Tweets

  • Categories

  • Monthly Archives