Apparently the code tags here don’t really like some code. This is made notable by the complete omission of some of the code that belonged in the sed commands of the script. So, in order for you all to actually get the complete code I put the code here at http://lincgeek.org/linc/scripts/identibash. Have at it and enjoy!

I was reading my rss feeds today and ran across this great article telling how to use wget or curl to make a twitter post. Well I just happen to use identica (free and all) server that my friend Dann set up, so that stuff didn’t quite work. Drat. Well, when I saw Dann pop online I suggested that he check into it because it sure would be cool to be able to microblog straight from the command line. After all, commandline=good! Dann said he would look into it.
Well, as it turns out, I am terrible at waiting and after cruising the net for some more specific information about how identica does things I stuck together a nice little bash script myself to read and post to that particular identica server. Here’s what the code looks like:
#!/bin/bash
# Based in part on article found at http://www.ibm.com/developerworks/linux/library/l-friendfeed/index.html
maxitems=5
user=johnhancock
pass=ubersupersecretandstuff
puburl="http://stream.tllts.org/identica/api/statuses/public_timeline.xml"
posturl="http://stream.tllts.org/identica/api/statuses/update.xml"
function readpub()
{
clear
curl -s $puburl > /tmp/tweet.tmp
count=0
echo "-------------------------------------------"
while read line
do
if $(echo "${line}" | grep -q "text>")
then
echo "${line}" | sed 's/
fi
if $(echo "${line}" | grep -q "created_at>")
then
echo -n "${line}" | sed 's/
fi
if $(echo "${line}" | grep -q "screen_name>")
then
echo "${line}" | sed 's/
fi
if $(echo "${line}" | grep -q "")
then
echo "-------------------------------------------"
count=$((count + 1))
if [ $count -eq $maxitems ]
then
break
fi
fi
done < /tmp/tweet.tmp
}
function postmsg()
{
curl -s -u ${user}:${pass} -d status="$msg" ${posturl} 2>&1>/dev/null
}
getopts "rp:" flag
case "${flag}" in
r) readpub ;;
p) msg=${OPTARG}; postmsg; readpub ;;
esac
If you would like to use this for identica or twitter for that matter there are only a couple changes you need to make. You have to change the variables in the beginning of the script to reflect your own settings. User is obviously your username and I understand that some services make you use your email address for this. Pass is simply your password. Note, however, that if your username or password contain wierd characters like spaces, you probably want to enclose them with double quotes. The maxitems variable tells the script how many posts to display. Five items seems to fit nicely into a standard xterminal window. Lastly, you need to alter the URL’s there, or simply join the identica server in our own little corner of the web. The url of the article included in the bash source code will give you the correct url’s for twitter and if you are using identica, you should be able to figure it out from the url’s I have provided in the script that connect to the server I use.
That’s really about it. The script is easy to use. Use the dash r option to read the recent tweets. Use the -p “some text here” option to post “some text here” to your account. Do note, however, that at this time the program does not do any urlen/decoding conversions, so watch your punctuation. If your post does not seem to actually post, that’s probably why.
As always, let me know what you think and if there is any interest, I’ll be happy to post up a project page for it and we can make it work a bit better. In fact, I keep thinking that it’d work really well as a command line php script, but that limits the userbase a lot more than bash does
Many many times I have overheard people ask Allan where he gets his LED badge he wears at the shows. He gets them from the discovery store. Well I just saw an advert to purchase them at a good price and thought I’d pass it along for those of you who are interested.
These things generate a *lot* of interest at the Linux shows.
Let me preface this by saying that if you are not running Ossec on at least your external facing machines, then you should be. It’s great software!
The reason this post is here is for reference mostly and maybe to be able to help someone out later via their favorite search engine.
I have been getting a couple errors reported lately through Ossec emails that report: “insmod: Hint: insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters. You may find more information in syslog or the output from dmesg”. Well, after checking, the actual error is found in /var/log/messages and is “floppy.o: init_module: No such device”. AHA! Well, it just so happens that these machines are servers *with no floppy*. The fix for this to turn off the errors seems to be to add “alias floppy off” in the /etc/modules.conf file and then run a “depmod -a”.

After a year at my new job I finally got a new computer to work on. This thing is absolutely smokin! It’s a Dell Latitude D630, Core2Duo 2.5ghz, 4gb ram, 120gb hdd and all the trimmings PLUS 2 20″ monitors to hook to the dock. That’s right, my desktop is 3360×1050. I have to say it’s pretty sweet to have some screen realestate to stretch those xterms across
It’s also great to have a computer that will let me use the USB and/or cdrom without rebooting the computer each time
And yes, it runs Linux – Ubuntu 8.04.

I just wanted to tell you all a story about a fantastic company. That company is Neuros Technology.
Long long ago, when Neuros first released the OSD, Joe Born, the man behind Neuros, arranged to get me a review unit. I received the unit, reviewed it and “saw that it was good”. Things were a bit premature in those days, but there was some real promise there. Most importantly, the networking bits were still not working just right, but were in the works. Knowing this, I shelved the unit thinking I would re-review this as soon as the next major firmware revision came out for it. As things happen, it sat on the shelf for over a year
Fast forward to a few weeks ago when I contacted Joe again to see if we might be able to get a unit and some literature from him for a giveaway at the OLF 2008. Joe agreed and sent one right out (told ya these guys are great). A couple days before the fest, I finally had a spare minute and figured that I ought to dig mine out and play with it a little so I could accurately field questions, etc. I dug it out and followed the very nicely layed out directions on the Neuros website for doing the 6 firmware revisions I had to do (told you I had it shelved for a while) and I started to play with it. Doing the upgrades was actually pretty neat because I got a 40 minute demo of how much the UI and utilities had changed since I first looked at it.
Once the upgrades were done I set out to give it the run through. I am amazed with the changes that have been done. The menu system is good looking and easy to navigate, there are lots of interesting features that have been added, and every video format I had available digitally to try, worked without a problem and looked good on my tv too. I was absolutely ecstatic. This thing is brilliant… That is until I tried the networking.
After digging for some appropriate length cables, I decided to plug in the network and see what was what. To my surprise, each time I did so, within a few seconds, the OSD would reset itself. If I left the network cable plugged in for the reboot, it would continuously power cycle itself. If I unplugged the network cable from the OSD, all was fine again. I tried new cables and different hubs and switches all with the same result. I was stymied and decided to send out an email.
I sent an email to Joe, telling him I knew I should speak to someone in support, but I wondered if I could sneak a quick question by him. I told him of my troubles and awaited a response, thinking I would get one sometime while I was at OLF. To my surprise, I got a response back within a few minutes. Joe had also piggybacked the question to his technical staff, who responded that that sounds like a problem they had early on with the units and they had to be retooled at the factory. When I responded asking if there was a trace or bad component I could replace here (my soldering skills may be rusty but they are still there), or if I was just out of luck, Joe said not to worry, they would just send me another one. Hot Diggety! I figured that even if I had to live with no network connection, the unit was still pretty cool, but they were going to send me a replacement! Within 1 day, I even had a UPS tracking number. How’s that for service!
Well, today the new OSD came via UPS. it is every bit as fun as the old one to use, even more because this one connects to my network and lets me watch all my videos without hesitation or problem. Apple TV, eat your heart out.
As for Joe Born and Neuros, I have NEVER had customer service like that in my life. There isn’t even a point of reference to compare them to. Obviously you just can’t go wrong dealing with Neuros and their products. Buy them, you’ll like them. And tell them Linc from TLLTS sent ya.
Friday:
* Up at 2am to do the 3 S’s and drive to meet up with Allan and Pat in Easton, so we can all drive to Columbus together. We rented a Kia minivan, which drove really nice and was much more comfortable than a plane trip would have been. We left around 4am-ish and arrive in Columbus around noon. First people we run into are Russ Wenner and his dad. We say a quick hello and head over across the street to Max and Ermas restaurant to grab some lunch. We marvel at the testosterone challenged ineptitude of the wait staff there. After lunch we relax for a few until everyone else starts to show up, then we start congregating and checking out each others geek gear. The Acer Aspire One’s boot the fastest by the way
Around 6pm we all head over to BD’s Mongolian Barbeque. I love that place – the food is sooooooo good!. This was followed by the OLF pre-show party, held at Barley’s across from the convention center. This is where the real meet-n-greet starts and the drunken debauchery begins. Dann had a really, really good time. ![]()
Saturday:
* The convention begins at 8am and we have to unpack. Boy oh boy did we have a lot of Swag to give out this year. Special thanks go out to our fantastic sponsors Pearson Education, APress and O’Reilly for sending us some fantastic books to give away and also to Neuros for providing us the grand prize giveaway, a Neuros OSD (v1)! There were easily 500+ people at our booth for the giveaways and I have seen estimates on another blog of 1000. It’s hard to tell from my perspective each year because the audience always seems to wrap around the corner where I cannot see them
Either way, there were a lot of people and it was great to meet not only our long time friends there, but make new ones as well. The conference was ended by Jono Bacon‘s keynote, which I really enjoyed. Dann was even called forward during the keynote by Jono to be part of the “demonstration”. All I have to say about that at this time is Dann has got to have balls of steel the size of boulders, and if he had turned around, I bet someone would have a picture for proof
After the show was over, we went to The Happy Greek, which is another restaurant we cannot miss each year, where I really enjoyed the Chicken Shawarma over Hummus. This was followed by the post-show party, where many of us gathered to enjoy a little geek socialization and swap stories about Dann.
Sunday:
* Not much to say about Sunday other than I was sad that the fun was over. Allan, Pat and I packed ourselves into our Kia rental and high-tailed it out of Columbus. During the trip we called into Dave Yates’ first Lotta Linux Links Dot Com Linux Users Podcast call-in episode that he was recording on his drive home. We all swapped some stories and our impressions of the show. Once I finally arrived home, I dragged my poor sorry behind into bed to relax and watch tv for just a few minutes around 6pm, and promptly found myself waking back up at 2am this morning
All in all, I really enjoyed the trip, just as I do each year. I love to meet all the show listeners and really love to have the opportunity to hang out with our peers as well. I can’t wait to get to the next con and do it all over again.
For those of you who want to find the gang tonight:
6:00 pm BD’s Mongolian BBQ
7:30 pm Barleys

I noticed today that my laptop was building a little dust/crud on it today so I set out to clean it up. Nothing annoys me more than to have to use a dirty laptop/keyboard. It sort of gnaws on me until I fix it. Anyway, I was cleaning my laptops and keyboards, mice and monitors (well, lcd’s really), and it occurred to me that perhaps you all were looking for some good information on how to do the same and I should probably share.
I use basically 2 products to help keep these things working, shiny and clean, Swiffer dusters (generic work fine) and Windex multi surface wipes (again, generic is fine). The wipes are for getting real dirt and gunky spots clean and they work well for a general surface cleaner. Do note, however, that you should NOT use this stuff on your lcd or crt screens. I have never had a problem with this stuff eating plastic, but it will leave a little residue on your lcd/crt screen that you may notice (I do).
For just a quick dusting, and for the most part, this is all you will probably need most of the time, just use a Swiffer duster. These things are the bomb. Use them on any/every surface and they will pull off all the dust that electronic equipment tends to accumulate with an alarming frequency. The best part is cleaning up with one of these is uber fast too.
Lastly, if your lcd/crt screen really is dirty and you need to clean it, nothing works better than using a clean soft washcloth with warm water. Wipe your screen clean with that and then immediately dry it with a soft towel. Windex and other cleaners will leave a residue that you may not notice, but after time it will build up and you’ll notice your screen looks faded or washed out. Try the washcloth and warm water and it’ll bring it right back to new in many cases. Also, don’t use paper towels because they not only leave lint, which is annoying enough, they can have paper dust which can be abrasive on your screen.
Just use these few cleaning tips and you too can keep your goodies clean and new looking, and if you have a cleaning tip, to share too, just let me know!


Recent Comments