feedHopper To The Rescue

My abandonment of Google Reader is complete now. I have found an app that is independent of Google Reader, it’s called feedHopper and it’s available on the iOS App Store. It means that I’ll only be able to handle my RSS feeds on my iPad, but that’s okay, since that was where I wanted them to be anyways. The app is quite handy, you can set up Google Reader as a sync service, hoover in your feeds and then disconnect. Kicking Google Reader to the curb as it were. It comes feature complete with lots of sharing options including my beloved Pocket service.

I don’t think I’ll ever go back to Google Reader. I’m happy with what I’ve got. I recommend this app to anyone who used to use Google Reader. Now it’s time to dump all the apps that only work with Google Reader. In a way, Google dropping reader put a bunch of iOS devs out of business. Poof. Like that. That’s what happens when you hitch your horse to Google. You’ll need a 55 gallon drum of lubrication for what is coming. HA HA Dangly Bits.

God I Wish… Ah!

Apple Inc.At work I’ve been thinking about a particular system administration subject on and off for a few days now. When Mac is first installed all the “Optional Sharing Services” are all shipped defaulted to off, which makes sense and is fine. Generally speaking I’ve been fine with using Apple Remote Desktop to share the workstation, open System Preferences, and turning on whatever sharing bits I need to have on for the client workstations and that’s that. However that’s not really that elegant and I’ve been looking for a way to programmatically do it on the command line. As it is, Apple Remote Desktop can send Unix commands to connected workstations. All my client workstations are assembled in a neat little pile on my Apple Remote Desktop screen, as easy as you please. How can I turn on or off these Sharing services without having to upset the user. Ideally I want to turn these on without even sharing their workstation, to in a way, do it under the covers.

Enter the command systemsetup. G’duh. There’s even a handy-dandy template in Apple Remote Desktop that I’ve overlooked all these years that even has the details of the options laid out. So, in Apple Remote Desktop, select the stations you want to change, click the UNIX button, in there select the right template, change the user to root and send the command. Moments later, and in this case, SSH is up and running on the client workstation as easy as you please. Boom. No futzing with sharing workstations, no mucking about with System Preferences. Just simple, easy, like I knew had to exist. Now I know how.

This is actually the way I prefer to learn these things. This was something I sussed out, so it’s worth more than if I just spotted it in some bit of documentation. It took time and energy and it’s mine. The solution is worth something to me, and so I blog about it so I can celebrate Mac OSX and keep a little log in case I forget in the future. It’ll always be here.

Hooray for Mac OSX!

photo by: marcopako 

Installing a HP LaserJet 1505 printer on Apple OSX Mountain Lion

What a problem this was! We had a user with a MacBook Pro that had a new copy of Macintosh OSX Mountain Lion 10.8.2 running on it. Plugged in a rinky-dink HP LaserJet 1505 and nothing. Even though there was the exact same printer installed before, from the user’s home, the system refused to reuse the connection for the printer at work. Obviously that has to be because the system notices it’s a different device and refuses to play along, which I find stupid.

Plug in the printer, try to add it, and the Add Printer function goes out to Apple Software Update to look for the driver and then comes back and tells us that nothing is available. Then commence zombie debugging via muzzle flare, wandering around in the dark trying to fix what shouldn’t be happening but apparently is beyond all logic and reason.

So how you do diagnose a Mac? Here’s a handy-dandy guide which anyone can use to fix their Macs. I seriously doubt any issues ever survive this particular procedure:

  1. Clear PRAM – Turn off computer, turn on computer while holding down  Command-Option-P-R. The computer will restart and you’ll hear the startup chime twice. Let go of the keys. ~ For this, just do it. It doesn’t matter if you don’t think doing this will fix your problem, it will. Just shut your pie hole and do this. If you don’t do it, I don’t want to hear about your problems. It’s magical. I don’t care if Apple says it won’t do anything. This thing DOES EVERYTHING IN CREATION – apparently. That and it cannot hurt. Lots of fluids and plenty of bed-rest. 
  2. Repair Disk Permissions – Start Disk Utility, find your “Macintosh HD” and click “Repair Disk Permissions” and wait. Do this. Often. Regularly. Lots. Weekly. Now.
  3. Download Onyx. Pick which version of OSX you are using, download it, install it and use it. I recommend skipping everything it wants to do and going right for the Automation button. Uncheck “Repair Permissions” and “Display of folders content” and check the rest. Click Execute and wait. When the system asks for a reboot. Reboot. Everyone should do this weekly. Think of it like vitamins for your Mac. Plus, it can’t hurt.

At this point your system should be all spic and span and whatever niggling bit was bothering you should be dealt with. Of course, for the problem I had to deal with at work, there is one little thing extra, one thing more. Open Finder, click Go on the Menubar, then Go to Folder… and type in /Library/Printers and click Ok. You’ll see a list of folders. In this list find the folder named “hp” and KILL IT WITH EXTREME PREJUDICE. Y’arr! This !@#$ folder is at the very center of my hatred for all that is Hewlett-Packard. I’ve started to unceremoniously refer to them as Fudge Packard. Bastards. Anyways, killing the folder does the trick, it clears everything up and Mountain Lion can download software from Apple again for the HP Drivers – blah blah blah. I’d rather just get a sledgehammer and pound the HP LaserJet 1505 into foil, but hey, you have to cope or have some sort of attack. I regret buying HP. I regret the LaserJet 1505. What a piece of crap. Steaming.

Bee Venom Destroys HIV And Spares Surrounding Cells

Bee Venom Destroys HIV And Spares Surrounding Cells.

Wouldn’t it be just the way. The cure for HIV and Cancer is flying around collecting pollen and MAKING HONEY.

It would be hilariously appropriate for the cure to have always been there. Just minding it’s own business. Visiting flowers. Pollinating crops. helping humanity by… oh yeah, this too. *smirk*

Starting Out Small

ethernet cablesThere is an issue I have at work, something I’ve written about before in my logs that I’ve found a solution for that I feel I can blog about. I can’t really talk about the why behind all of this, but I can share a technical explanation of how I am addressing this problem. It’s a half-thing, bear with me.

At Western, I’m very interested in the number of open TCP connections that a workstation has open at any one time. I don’t care what state the connection is in, ACK_WAIT to any of the others, if there is a line, I want to know about it. Specifically I want to know how many lines there are. Mac OSX is based on Darwin, and Darwin is based on BSD – so you get a shell to work with when you start Terminal.app. There is a lot of power in the command line interface and once you get the hang of it, it’s really quite useful.

So remote stations, at least two of them I have turned on “Remote Login” in their Sharing applet in System Preferences which enables the machines SSH servers to answer incoming connections. I can use SSH to call up a command line window to those remote stations, feeding them commands. I have done this for a long while for our servers in the office but this is the first time I’ve seriously done this for workstations. So, with this connection established I want to collect the number of TCP connections that machine has established. On the command line there are lots of pieces to get this to work:

First, you need a loop structure so that the command happens regularly: 

while true; do [command]; sleep 60; done

This will run a command every 60 seconds and it will never end unless I send a Control-C character which represents “Break” to the shell.

At first I just needed to count how many connections. You get this number, or at least an approximation of it this way:

netstat -p tcp|wc -l

That calls netstat to list out all the TCP connections, which then I pipe, using the pipe character ‘|’ to another command called wc, which calculates word-counts. I make wc ignore words and just count lines by using the -l switch. I don’t really care what other stations my targets are communicating with, just a count of how many. And yes, technically the SSH connection inflates this by at least one connection, it’s not intended to be forensic.

But something was missing. I need a date stamp. In BSD, there is a command called date, and you can give it a format so you can make date write out the Hours, Minutes, and Seconds the way you want to see them, but date has an annoyance to it. The command date always inserts a ‘newline’ character at the end, so what you’d get is a date, a new line, and your count. It’s okay, but it’s annoying. It would be far better to get rid of that newline character altogether. Enter in the ‘tr’ command, which translates characters. In this case, we tell tr to just delete the newline character, so ask date for the right sort of date, have tr nail off that newline at the end because it’s annoying and…

while true; do date '+%H:%M:%S '|tr -d '\n'; netstat -p tcp|wc -l; sleep 60; done

This outputs a very nicely formatted report on a remote workstation. So now I have datestamps, connection count levels, and when the count gets to a certain number and things happen, I can be faux-psychic.

UPDATE: Apparently I just can’t leave well enough alone. Seeing a slow parade of numbers trot by is rather dull when all I really want to know is when these numbers say, get over 70. So…

while true; do test "$(netstat -p tcp|wc -l)" -gt 70 && (date '+%H:%M:%S '|tr -d '\n'; netstat -p tcp|wc -l;); sleep 60; done

 

photo by: Bull3t

Pretty As A Picture

While screwing around with my blog today I did notice something missing that I used to enjoy from the Plinky site that I used to use for blog prompts for interesting things to write about. WIthin Plinky you could put a word down and search Flickr for images you could use in your blog. That was a really cool feature and it made including pictures in my blog very easy. I didn’t have to worry about stealing photography from someone else as it only used pictures that were released under the Creative Commons licensing model. Since I don’t make any money from this blog, the Creative Commons has really helped out.

051 of 365 - Droste Effect [Explored]

So I went looking. I could still futz around with Google Image search which is annoying as you can’t define a default (only Creative Commons licensed) search that I could find – yes, you can go in afterwards and mark up an Advanced Search, but it’s annoying. In fact, I don’t want to ever leave the WordPress interface at all! So, thanks, perhaps, to PhotoDropper Plugin I won’t have to. I’ve seen some people complain about it but so far I haven’t seen any of the damage they have noticed on my blog. If the plugin behaves itself, I’ll enjoy it. Let’s see how it works with this post. 🙂

photo by: Yogesh Mhatre

Tent Flapping

Spam wall
Went back and forth just now on IntenseDebate plugin for WordPress.org. I thought it might be useful and add some features to my blog that would be nice to have, like After-The-Deadline plugin for comments and such. Everything was going well until I noticed that my Akismet Spam queue was at 74 comments. I tried to open the queue and couldn’t as IntenseDebate had replaced that part of my blog with its own controls. So, with no way to look at my Akismet Spam queue I decided that the pros for the IntenseDebate plugin couldn’t compensate for the way it broke my blog when it came to Akismet Spam queue access. So, there was for a brief time a new comment system, and then there wasn’t.

Which doesn’t mean a lot because people aren’t actually commenting on my blog, they are commenting on Facebook. I do get the one-off Twitter retweet or favorite, but that’s it.

Very Far Around Robin Hoods Barn

Oh the lengths you’ll go to include services such as Google+ that by design do not readily make themselves available for such things! First I had to find a way to link my Google+ profile to my Google Voice number, all to get a magic email address which I can only send using Google Mail so that the email will automatically end up on my Google+ profile. That part is done, then I went over to IFTTT.com and investigated how that might work. So I uncorked the WordPress channel and set it to watch this blog for new entries, when it sees one, it should collect all the details and then send those using my Gmail account to my Google+ magic email address. Now lets see if the damn thing works. 🙂

TL;DR: Now I have a way to publicize on Google+ from WordPress automatically.

 

Drafts Changes Workflow

The more I use the Drafts app for my iPad and iPhone the more I love it and the more I want to use it. It’s actually changed the workflow for my “Post-a-Day” WordPress blogging as well as my regular blogging in general. What I used to do was copy the Post-a-Day prompt emails over to my WordPress blog and set the post type to Drafts and let them sit there. I’ve never been a huge fan of the editor built-in to WordPress, but copying the emails to Drafts and storing them there, syncing them to Simperium which then synchronizes them across all my devices that have Drafts loaded on them, which is now just my iPhone.

The app itself has so many neat features, being able to store multiple drafts and have them swipe-accessible from the left makes switching files a breeze and then when the post is done and ready to be published I can swipe from the right and select as many services as I want to send my drafts off to. It’s the perfect promontory to launch Day One, Facebook, Twitter, Tumblr, and WordPress. Generally speaking, the drafts themselves almost always follow a certain path, first to Day One then to WordPress because then WordPress sends links to Twitter, Facebook, and Tumblr on my behalf with the publicize feature. But sometimes I write things that don’t go to my blog, in that case I can send to Day One and Facebook. I have configured the apps representation in Facebook to conform to my “Sharing” security group, so even if I tap the Facebook option I don’t have to worry about my private sharing thoughts leaking out where they don’t belong.

The only thing (yes, there is one of these for every user) that I would really love is a Drafts app for Mac OSX. That would let me hack away on Drafts entries on my iMac without having to clear off workplace desktop space to set up my iPad. I think it’ll just be a matter of time before we see those options start to become available. I would pay $15 for an app like that without even batting an eye.