Wednesday, November 13, 2013

wget missing from OS X

This will be one of the shortest blog posts ever. 

wget is installed by default on OS X, they just misspelled it. Instead of:

wget www.example.com/file.txt

They spelled it

curl -O http://www.example.com/file.txt

Jerks. 

I'm kidding of course- I know that curl isn't wget, but for most purposes this will work just fine. If this saves someone from trying to figure out how to install wget on OS X when they can just use curl then I just saved a chunk of somebody's time. I imagine you could even alias it if you have some scripts that use wget. 

You're welcome.  Or I'm sorry, depending on the situation. 

Thursday, May 30, 2013

Lazy mans Drupal quasi install profile using drush

This is one better than a standard drush make file because it actually enables and disables modules and themes according to the original site.

I might be missing something but I can find anything about drush doing this automatically- but it sure seems like there ought to be a way to use drush to spin up a site with a predetermined set of modules and then enable or disable certain modules for you - and base it all on an existing drupal instance.

After all, drush can do the following:

create a make file that will download all modules:  drush make-generate  
list modules that are enabled:    drush pm-list --status=enabled
enable modules: drush pm-enable module_name1 module_name2

It seems to me all of that should be bundled together for folks who don't want to make an install profile but want a certain list of modules installed and then a set of those modules enabled and/or a set of default modules disabled. All of these things can be done with drush but it isn't automated like it should be ( as far as I know at any rate.)  Or maybe making install profiles isn't as hard as I think it is... I dunno

Here is what I found that seems to work for me. 

1. Set up a site that has all of the modules you want and then enable or disable modules as needed. 
2. Make a drush make file.

drush make-generate > mysite.make

3. Create a list of enabled modules

drush pm-list --status=enabled --pipe > mysite-enabled.list

4. Create a list of disabled modules

drush pm-list --status=disabled --pipe > mysite-disabled.list

5. Copy all three files (mysite.make, mysite-enabled.list, and mysite-disabled.list) into the directory of the new site.

6. In the new site directory do:

drush make mysite.make

and let it do it's thing. 

7. Create the database for your site in the normal manner either with drush or myphpadmin or however you are used to. I haven't tested it but I think you can do drush sql-create with a bunch of options to create the database- this means you could in theory do everything from the command line and/or create a shell script to do all of this. 

8. Go to the new site with a web browser- you can use any profile you want but I usually use the default profile for Drupal 7. After the site is finished installing you can look at the modules page and see all of your modules. But wait! They aren't enabled!!! I have 338 modules to enable and 4 modules to disable! I'll be clicking all damn day! 

No, you won't have to click all of them by hand, just do this:

drush pm-enable $(cat mysite-enabled.list)

Answer 'y' when it asks if you are sure.

Then disabled the rest:

drush pm-disabled $(cat mysite-disabled.list)

That's it! 

There has to be a better/easier way to do this but I couldn't find one after a few hours of goggling

I tested this with Drupal 7.22 and Drush 5.9. If anyone knows of a better, lazier, slicker way of doing this please please let me know. 




Saturday, December 8, 2012

Ubisoft download manager sucks balls

I got a free copy of Assassin's Creed 3 when I bought a video card. I had to download it using something called Ubisoft Download manager. Man that things sucks. Maybe I'll post more once I figure out how to get it to work. It keeps reporting CRC failures and requests that I turn off DMZ on my router (which isn't turned on btw). What an embarrassing piece of crap software.

Friday, April 20, 2012

Concentration is gone.

Ugh. Is there any end to the distractions? An article I read recently said the average office worker is interrupted an average of every 11 minutes by phone calls, emails, or coworkers stopping by to chat. I don't know how accurate this report is but it sure seems like we are all developing ADD. I think technology workers are especially effected by this phenomenon. We, as a group, tend to be the overstimulated type to begin with constantly jumping around from topic to topic or from tab to tab in our web browser.

I am interested in everything and easily distracted by shiny objects: "oooooh look at that! I wonder how that works?" or "Boy I didn't realize they had released an update for that software, I wonder what the new- oh crap what does this log entry mean- now where did I put that book on log analysis- oh wow here is my old php book, i should pick that back up! I wonder if my web hosting account is still active, what was my domain again? Oh! I should check and see if any of my domains are getting close to expiring, let me search my email. Uh Oh there are 12 new messages in my inbox....."


And so goes my day. With dozens of calls, emails, and people stopping by or mentioning things to me as I pass by. It's really amazing that I get anything done at all... I learn a little about a lot and not in a very efficient way. I seem to remember spending countless obsessive hours learning one topic when I was younger, really digging in to how something worked, chugging coffee, chain smoking and writing code for days on end. I miss that. The intellectual pleasure of immersing myself into a topic completely and coming out the other side with some real solid knowledge that I have used ever since. I used to do this all the time.

I don't do that anymore. I have toys, I have a job, I have responsibilities, I have hobbies, video games, TV etc etc.... I had to give up caffeine and nicotine, my two major concentration enhancers, and now I have the attention span of a squirrel on amphetamines.

I'm not sure what to do about that...

Oh well, time to go check Facebook.

    

Sunday, July 3, 2011

Google Plus or Google+ first impressions.

I managed to snag a Google+ account though an online acquaintance. (Score!) After playing with it for a while I am very encouraged by what I am seeing. It is most definitely in beta so little glitches can certainly be overlooked.

Google Plus clones the basic idea of Facebook (as Facebook did with Friendster/Myspace and the like) without stealing anything that could invoke lawsuits and totally integrated it with Google's other services like search, gmail, blogging, etc. Google has also added a video 'hangout' feature which I haven't been able to test completely since there aren't many folks on Google+ yet.  I clicked on  "Start a Hangout" and was brought to a popup window where I could "check my hair and make sure my mike works" which I did. I could also choose which "Circles" I was willing to 'Google Hang' with. Of course nobody was available since I only have one "friend" at the moment.

Circles are something that Facebook doesn't have that could give Google the edge. (I know similar functionality is possible in Facebook, but it isn't intuative and it isn't easy). Circles are groups of people. Just like in real life you have work friends, recreational friends, family, there may be things that you want to share with your drinking buddies that you may not want your bosss or your mother reading. Circles gives you an easy way to organize your people and who see's what.

Inversely you can filter out circles in your view. So if you aren't interested in reading about what your coworkers are doing you can turn off the coworkers circle. Simple right?

Monday, June 27, 2011

Spiceworks - A FREE (ad supported) complete network management and inventory system

I've started testing out Spiceworks on our campus network. Spiceworks is an IT inventory, monitoring and help desk system. It has a dizzying array of features which you can read about on their web site, and that I'm sure I'll get around to describing on this blog eventually. I really like what I have seen so far.

The most interesting thing to me is that Spiceworks has adopted a much different business model than some of the other companies; an ad supported model that is completely free to the enduser. Since my boss told me my budget for an inventory system might be "something like $300" I immediately started looking for a free system to track our IT assets.

All interaction with Spiceworks is entirely done through a web browser (Chrome works great) and there are advertisements to the right of the actual interface. The ads are not too intrusive and are actually sometimes interesting, but they can easily be ignored while you focus on the task at hand.

So far I have scanned my entire network for devices. With some small amount of configuration it will detect switches, routers, PC, Macs, WiFi access points, VMware servers, printers and nearly anything else that can have an ip address. Spiceworks manages to do this without any client side agents through a combination of SNMP, Windows Authentication, WMI, and SSH. It can do a network wide software inventory, and backup configurations of Cisco equipment to a built in TFTP server on a schedule.

I have just started to scratch the surface of what Spiceworks can do, I have yet to explore the trouble ticket system or some of the more advanced control features possible with SNMP.

I'll definately be doing more posts about Spiceworks in the future, but if you are looking for and IT inventory and control system I would say that Spiceworks is worth a look.

Saturday, June 25, 2011

Migrating from Exchange Server to Google Apps for Business or Google Apps for Education

Last winter break I migrated our entire school from our aging Exchange 2003 Server to Google Apps for Education. Google Apps for Education is essentially the same service as Google Apps for Business except it has the added bonus of being totally and completely FREE to educational institutions. Forever.

The financial reasons for adopting this new platform are obvious, but how do I feel about the adoption of GAfE six months later?

Really good actually. I've saved the school money already by eliminating the need for purchasing another server. I have no more patches, security worries, backup or configuration concerns. Every single person on campus is using the same interface whereas before I had a half dozen different email clients plus the exchange web access to deal with- support calls for email have gone way down.

Remote access has become a no-brainer. Google docs makes sharing and collaborating easy for everyone on (and off) campus. The calendaring is as good or better than anything Exchange ever offered.  And while I have kept this a guarded secret; it is entirely possible to use Outlook with Google Apps in an entirely seamless way- you honestly can't tell the difference from an end user perspective. So the few users that have a need for it (scripts that call Outlook for sending emails for example) can still use Outlook without a hitch.

My only advice to someone considering migrating away from Exchange to Google Apps for Edu/Bus is to do a very small and very short test run with a select group of users. Do not attempt to do a phased migration or a long drawn out testing period. I might advise that you use a gmail account yourself for a month or so an explore all it has to offer and discover it's quirks.

While it is possible to do split delivery (some emails for a domain go to google and some go to your exchange server) it's a configuration nightmare and frankly not really worth it.   If I had to do it over again I would create a few accounts on the new Gmail server and forward emails from the exchange server to the new accounts. That would be the extent of my testing/ focus group.

After maybe a week of that I would just jump in with the transfer. Google has amazing tools that makes migration very quick and painless without any emails getting lost and they do have very good email support as well (phone support not so much).  Read everything you can on the google support site and have a written plan so that you don't get lost along the way.

Make the announcement, do short training intro session(s)- and just jump into the transfer late on a Friday afternoon if you can. Remind people that their accounts will be available right away but that it may take some time for all of their old mail to show up (Get ready for lots of questions about folders/labels or be sure to cover this in the intro sessions).

Despite the occasional headlines about Gmail being down, it is a very reliable service. I've not had a single problem with it that lasted more than a few minutes and not many of those.  For those concerned about backups and retention retirements there are reasonably priced services available to backup and archive Google Apps Gmail to a searchable and recoverable database.

For and educational institution it is hands down the correct choice. I can't say if it would be worth it in a business environment however I suspect that if you run the numbers Google Apps would come out ahead of an in house Exchange server.