My thoughts on lots of random things,ranging from Sys Admin and Programming, through to Travel and Lifestyle.
May 19, 2013 by Mícheál

Fixing Audio Issues in Google Chrome on Windows 8

I’ve had a few reinstalls of my Windows 8 Pro machine for various reasons, and inevitably any audio coming from Chrome usually seems to stop after just a short while. Changing drivers, “running Chrome in Windows 8 Mode” or other such solutions normally works.

Rather I’ve done the following several times, and so far it appears to be a permanent resolution:

  1. In Chrome, select the Menu, near the top-right corner, then settings
  2. Click “Advanced Settings”
  3. Then, under “Privacy” select “Manage Exceptions”
  4. Scroll down to “Plug-ins” then “Disable Individual Plugins
  5. Then Select “Adobe Flash Player” and Disable.

ONce that’s disabled, simply go to Adobe.com  and install the latest version of Flash Player. And that’s it! If you find this helpful, please just let me know in the comments below.

 


  •   •   •   •   •
May 19, 2013 by Mícheál

Building an MCSA Lab in Azure

Since I decided the do my MCSA, the next step was to start building up a lab to use. The options I had were to:

  1. Buy a couple of small servers and build a lab in my sitting room.
  2.  Run Hyper-V or VMware Player on one of my laptops
  3. Try and build a lab in the cloud.

Since I’ve previously used Azure to host a small LightSwitch project I had developed I thought I would try to build it in the cloud. As a fall back I might also install Hyper-V on my win 8 work machine, although at 4GB RAM, horsepower could be an issue! Dual-boot isn’t something I want to consider either.

One of the first places I started to investigate was Ketih Mayer‘s posts on building VM’s in Azure. He later directed me on twitter to http://blogs.technet.com/b/keithmayer/p/earlyexpertws12_cloud.aspx as a good starting place.

So the steps I actually took in building up my Azure lab were:

  1. Sign up for a free Azure Trial
  2. Log in to https://manage.windowsazure.com/ and create an “Affinity Group” (this just links the different objects such as VMs and storage together).
  3. Configured PowerShell per this post.
  4. Finally I actually configured a VM

The next steps were to configure and test a couple of PowerShell scripts to automate de-provisioning and re-provisioning the lab VMs. The reason for this is that even if the VMs are running or not they count towards your “compute” usage in Azure. So since the labs might only be used for a few hours every couple of days or so, it’s worth going through this setup. I did receive an error having first run the reprovisioning script:

“New-AzureVM : CurrentStorageAccount is not set. Use Set-AzureSubscription subname -CurrentStorageAccount storage account to set it.”

However I was able to easily resolve the issue using the following cmdlet.

 Set-AzureSubscription "3-Month Free Trial" -CurrentStorageAccount storagename

And here are the scripts I used to deprovision

# Specify the Name of the VM to Export 
  
$myVM = "MyVM"  
  
# Stop the VM prior to exporting it 
  
Stop-AzureVM -ServiceName $myVM -Name $myVM  
  
# Set the Export folder path for the VM configuration file.  Make sure this folder exists! 
  
$ExportPath = "C:MCSAExportAzureVM-$myVM.xml"  
  
# Export the VM to a file 
  
Export-AzureVM -ServiceName $myVM -name $myVM -Path $ExportPath   
  
# After you've confirmed that the Export file exists, delete the VM 
  
Remove-AzureVM -ServiceName $myVM -name $myVM 

and reprovision the VM. (These are Keith Mayers scripts, but I might adapt them slightly later to take file with VM names as a parameter, for multiple VMs).
# Specify the Name of the VM to Import 

$myVM = "MyVM"  

# Specify the Import Path of the VM’s exported configuration file. 
  
$ImportPath = "C:MCSAExportAzureVM-$myVM.xml"  
  
# Import the VM to Windows Azure 
  
Import-AzureVM -Path $ImportPath | New-AzureVM -ServiceName $myVM  
  
# Start the VM 
  
Start-AzureVM -ServiceName $myVM -name $myVM

In the next post I’ll go through modifying the scripts for bulk management of the VMs, as well as “right-sizing” the VMs, for management with Remote Server Administration Tools for Windows 8.

  •   •   •   •   •
May 8, 2013 by Mícheál

Studying for the MCSA

Since I’ve finished my Masters I’ve decided to progress my CPD by studying for a certification. While I have sat some Microsoft courses before, as well as an MCSE 2003 bootcamp, I never ended up actually sitting any of the exams as in the roles I held previously it was never felt to be a great value.

Since I now work in pre-sales dealing mainly with sys-admins, the certification I’m going to start studying for is the Microsoft Certified Solutions Associate (MCSA) in Server 2012. While I started looking for references on where to start I also found the 90 Days to MCSA site, which has some really resources that I’m going to use to start planning. Unfortunately there’s only about 30 days left, but I’ll do my best  to make use of these resources anyway.

I’m hoping to do this as cheap as possible, so I’ll take whatever free resources I can use. Before I start studying for the exams explicitly, I’m going to build up my 2012 background with some free stuff   starting with a MS e-book and some Microsoft Virtual Academy courses (I already use 2012 at work, but no harm going back to basics).And since I’ve already used Azure to build my Master Project  I’m also going to build my lab in the cloud, rather than messing with my laptop for dual-boot etc (although I may do this anyway just to have something when I’m offline as well).

 

  •   •   •   •   •
March 20, 2012 by Mícheál

Migrating a SQL Express 2005 to Another Server

Having only limited DBA skills (99.9% of what I do with SQL is reporting), I ran in to some issues when I had to migrate a couple of small DBs from a win 2k3 box to a Win 7 (64-bit). I spent a few minutes trying to remember how to do this (haven’t done it in about 5 years), and settled for a simple backup/restore.

So first I ran the backup script that I use nightly, then just copied to the new box (on which I had already installed SQL 2005 Express and the management tools). From here I tried to simply do a “restore database”, but when I did I received the following error:

System.Data.SqlClient.SqlError: The media set has 2 media families but only 1 are provided. All members must be provided. (Microsoft.SqlServer.Smo)

I did some digging and figured out that the simplest way to resolve this was to just create a new file location for the backup destination. I also coiped my backup script and changed the NOFORMAT option to FORMAT

DECLARE @DBName varchar(255)

DECLARE @DATABASES_Fetch int

DECLARE DATABASES_CURSOR CURSOR FOR
    select
        DATABASE_NAME   = db_name(s_mf.database_id)
    from
        sys.master_files s_mf
    where
       -- ONLINE
        s_mf.state = 0 

       -- Only look at databases to which we have access
    and has_dbaccess(db_name(s_mf.database_id)) = 1 

        -- Not master, tempdb or model
    and db_name(s_mf.database_id) not in ('Master','tempdb','model')
    group by s_mf.database_id
    order by 1

OPEN DATABASES_CURSOR

FETCH NEXT FROM DATABASES_CURSOR INTO @DBName

WHILE @@FETCH_STATUS = 0
BEGIN
    declare @DBFileName varchar(256)    
    set @DBFileName = datename(dw, getdate()) + ' - ' + 
                       replace(replace(@DBName,':','_'),'','_')

    exec ('BACKUP DATABASE [' + @DBName + '] TO  DISK = N''e:migration' + 
        @DBFileName + ''' WITH FORMAT, INIT,  NAME = N''' + 
        @DBName + '-Full Database Backup'', SKIP, NOREWIND, NOUNLOAD,  STATS = 100')

    FETCH NEXT FROM DATABASES_CURSOR INTO @DBName
END

CLOSE DATABASES_CURSOR
DEALLOCATE DATABASES_CURSOR

And the batch file that I use to schedule the script:

sqlcmd -S .sql_db_name -i Backup_tables.sql
pause

Next I reran the script, and did a restore from the new files (remembering to change the options to update filepaths if necessary!), and this time it worked perfectly.

  •   •   •   •   •
March 11, 2012 by Mícheál

Odd Windows XP Installation Error

Got an error 8192 while trying to downgrade (upgrade really) a windows Vista machine to Windows XP file \ie386\ntkrnlmp.exe could not be loaded.

I was doing the downgrade because Vista had never really worked properly on this machine, and lately performance was exceptionally bad.  I tried to run a HP-Compaq windows Xp Sp3 install disc and got the error. I thought first it must be a RAM problem, but it passed both the vista memory error check, and then passed the BIOS memory and HDD diagnostics with zero errors.

So next I tried a different HP-Compaq disc, but this time running XP SP2, and it worked first time! Pretty surprising, never had any Sp3 over Sp2 issues before

 

  •   •   •   •   •
March 8, 2012 by Mícheál

Refreshing My Bose Headphones

For the last four years I’ve used both in-ear and on-ear Bose headphones. Twice I’ve had to replace the in-ear phones (both times for free under the Bose warranty, I use them a lot so the cables tend to break internally), but when my on-ear phones started to show signs of waer and tear I considered changing them for a set of new Bose headphones, preferably a noise cancelling pair. But since I’m not made of money (with all the iPad stuff i’ve been buying, along with a new laptop). I decided to go down another route: a simple refurb.

Bose on-ear headphones

Before: old, tattered cushions and damaged cable

Initially I was only going to order a new cable, with the built in mic for use with the iPhone (fortunately the Bose design means it’s only a a 3.5mm jack on the headphones itself). But alas customer service told me I that wouldn’t work on my old headphones (I had  tried my local Bose suppliers but they said it would be cheaper and quicker to contact Bose directly). So a normal cable was ordered from the customer service (less than €6 for a 5 ft cable). And since I’m planning on keeping the headphones for another couple of years i also ordered some new ear cushions (€27) as the old ones were really tattered.

There was a delay of a few weeks waiting for the new parts to arrive, but once they did it was a simple 1 minute job to change the cushions, et voila : effectively new headphones for €35 as opposed to €150 for the equivalent new model OE2 headphones from the same company.  €35 mightn’t be very cheap compared to buying a new set of cheaper cans, but I’m expecting to get another few years out of these, so for that I consider it a bargain.

Bose On-Ear heaphones, after the refurb

After : as good as new!

  •   •   •   •   •
March 6, 2012 by Mícheál

My iPad 2 Set-Up

I originally wanted to get the iPad for my Masters, both as a testbed for the thesis I’m working on, and as a secondary screen for watching Adobe Connect sessions on, as well a PDF reader. As for other uses, I was actually skeptical that it would be really useful for anything other than a toy. But with the right combination of accessories it’s actually quite versatile and I find that we use it for many things that I hadn’t considered.

The Right Gear

The first 2 things I knew I would need were:

  • a cover/stand
  • and a screen protector (a clear film that protects the screen)

Re the case and stand Otterbox were the first brand that came to mind. I’ve used it before on my iPhone, and while the bulky case adds weight and detracts from the aesthetics for my money that’s a price worth paying for the extra protection on the iPad (well, that and €70!). In the 2 months I’ve used it I’ve been very happy with the case, and the main screen cover also doubles as a stand that allows viewing at 30 and 60 degrees. One downside is that when used as a cover this rubs against the screen, and I’d worry that this could in fact actually end up damaging rather than protecting the screen.

If you order from Otterbox directly it also ships with a screen protector, although in the end I opted for a different option and coughed up for a Zagg invisibleSHIELD (I got the Otterbox and Zagg seperately on eBay and it came to approx the same amount). Obviously because it’s much bigger than an iPhone screen it was much trickier to fit to the iPad, but I eventually got it on (although it took several attempts to get the Otterbox back on as the film kept lifting at the edges while the case was slid over).

In the first post where I decied to get the iPad I also mentioned that I might also get a keyboard, but instead of going for an Apple I went for a a Logitech iPad keyboard, due mainly to better  reviews on various, and so far I’m impressed. The keyboard itself doesn’t weight much (at least the weight of the keyboard and iPad is less than a laptop), and the case can double as a stand if you haven’t already got one. But the main reason I went for it is the keys are nice and smooth. For the vast majority of web browsing and multimedia stuff the keyboard isn’t necessary at all, but if you need to do any bit of word processing it’s a must, but I’ll go on to that in a second.

ipad, keyboard, espresso

Watching the rugby live, with keyboard for a bit of blogging.

A Really Useful TV

One the things that we end up using it for (a lot!) is as a secondary TV. I don’t have a regular TV service in the house, but the 20mb broadband allows “us to use apps like the RTE player and Netflix on both the  laptop and PS3. But given the excellent battery life, and the fact that both of these are available as iPad apps, the iPad is unbeleivably useful as a “TV”. Add in a pair of decent headphones and we can both sit on the couch and watch 2 completely different things at the same time. Domestic bliss! And because the iPad doesn’t need cables it’s no problem to bring it around without having to pause what your watching (if making the above pictured espresso, for example).

Word Processor

Obviously on it’s own the iPad does not a good word processor make. But fitted with the aforementioned keyboard, and using Evernote as the backend, the iPad is surprisingly useful for text processing. Because of there size, neither the keyboard or iPad are stable enough to use on your lap, but on a regular desk it works perfectly well. As long as it’s just plain text (with no formatting) I find the iPad is actually at an advantage over using the laptop as there are less distractions. So what I often end up doing is using the iPad to just do all  the really hard stuff (ie content generation) in Evernote, and then tidy it up later on the laptop. (That’s actually how I’m writing the blog at the minute!)

Oh yeah, I’d Recommend one

My biggest worry was that after the expense of getting one was that the novelty would wear off after 2 days and it would be thrown in the corner, like the old gen 1 Galaxy Tab I have. But I really pleased with the iPad 2, to the point that instead of buying a second replacement laptop for the both of us, we’ll just use the iPad in it’s place. Sure, I still need the big laptop for a lot of the “heavy lifting”, but the iPad is definitely feeling a lot more roles than I ever realised it could do.

  •   •   •   •   •
February 27, 2012 by Mícheál

Free Online Training

Free Courses

At the minute I’m halfway through a Masters in Cloud Computing, so on top of working full-time, and trying to lead a normal life outseide of work and college there isn’t a lot of time left over. However I like to have several “projects” on the go, and for the last year or so I haven’t really taken advantage of keeping my skills portfolio up to date. So this year  I’m also doing free courses online from 3 different sources:

  1. Microsoft Virtual Academy
  2. Codeyear
  3. CloudU

The good thing about all of these courses is that they are free, and while I need to have flexibility around times, the courses don’t have any set time requirements for completion.

Microsoft Virtual Academy

Of the 3 sources, this is defintiely the one with the most material. Basically there are a number of different modules than can studied (think Windows 7, Hyper-V, MS Private Cloud), the format being a few videos for each module, with some papers to be read and a final multiple choice test at the end of each module that needs to be completed in order to advance. Points are awarded for each module, course completed, and if you are in teh top 10 ranked in your country you can recieve a free Technet subscription. In fairness, Dave Northey (the Irish IT Professional) has tried to reinvigorate the training in Ireland by offering a draw for prizes for those who complete a certain module each week.

Overall I find the academy ok: most of the material so far is based on cloud and virtualisation (at least the tracks available in Ireland)  but it has a few flaws:

  • some of the questions in the exams (similar to MCSE exams) aren’t relevant to the material cover, or are very ambiguous.
  • It would be worth having a better “rewards” system in place, for example a simple certification hierarchy. I.e. A MS Virtual Academy title that you can refer to on Linkedin, badges for your blog etc.
  • Most of the material is in video format. at least it’s supplied in multiple formats (wmv, mp4 etc), although transcripts of the recordings would be very useful as well.

Codeyear

Codeyear is a much simpler type of course, both in the course presentation and amount of material covered. Started in January this year, it’s aim is to bring programming to the masses. The way it works is simple:

  • at the start of every week a new lesson plan is released
  • People can program online, and as each objective is completed then again people can progress.
  • Codeyear is a bit more gameified, in that each badges and scores are awarded to make it a bit more fun.
  • Currently Javascript is the only language thought, although more languages are planned in future.

As someone with experience in programming other lanuguages I find this pretty easy, and there are probably faster ways for an experienced developer to get up to speed. But it’s a nice, simple way to learn and javascript is definitely a good string to add to the bow, so if you have the time I’d definitely recommend it.

CloudU

This is an initiative by Rackspace to provide a vendor-neutral Cloud qualification. I’ve only done 1 out of 10  leesons, so I can’t comment a whole on the rest of the course, but it seems to be a more introductory course, aimed at giving an overiview to IT professionals and managers (what’s an IaaS, how is it different from a PaaS etc) , rather than those who are tasked at implementing a Cloud service from the ground up. Leesons consist of some reading material and a recording, and the content is developed by Ben Kepes, who is an independent contractor.  It’s a course I have the least amount of work done on, but I imagine it will be the first course that I will complete.

Honourable Mention

This is something I have actually used myself, but if I ever need to do any Ruby or Python Learn Code the Hard Way will be my first port of call. It seems to be a simple learning mode, and I’ve heard a lot of good things about it.

Wrap Up

Like most people I haven’t a lot of spare time, and with myself in particular it’s at an absolute minimum (I’m doing this post as a break from virtualisation labs I’m doing!).  So there’s no piont in just doing courses for the sake of it. But I still think it’s important to keep up to date with things in your field. Even if some of the courses I’ve done aren’t directly related to what I’m working on at the minute (some the MS cloud & virtualisation courses for instance),  there are a lot of indirect skills I’m taking from them (background on SAN technologies etc).

Hopefully some of the course providers will also start to offer a more standardised recognition for the courses as well, such as an easy way to integrate the courses into Linkedin, or the badges that can be integrated into blogs

 

  •   •   •   •   •
January 20, 2012 by Mícheál

Why not to use Fadas in Windows user names (or other non-standard accents)

My new laptop arrived earlier in the week (I’ll do a review at some stage later), and while setting it up I chose a user name with an English spelling, because of issues I had previously on my old laptop.

Originally on my last machine I had a user name with “Mícheál” as the user name (for non Irish speakers the accent over the “i” and “a” is called a fada. Alt Gr + “i” give the “í”, Alt Gr + “a” give the “á”). And while this caused no problems 99% of the time , there were 2 times it caused hassle:

  1. some apps would install apparently correctly but would have problems with paths
  2. dialling in remotely would cause problems if I didn’t have a keyboard configured as Irish on the remote side.

I could porbably work around the second point if I could rememeber the French version (the acute I believe, might need to check there are no accents needed for that!) of the letters. But it was the first point that caused the most hassle.

I use the SpringSource Tool Suite as my IDE for Java, which is based on Eclipse. But I eventually figured out that a lot of weird issues were arising from the fact that Eclipse (or in some cases Maven), were having issues in reading file paths with the fadas (ie c:\user\Mícheál). While some locations would show fine, others would render with garbage characters in place of the Irish characters, and in some places the characters were just stripped out completely (eg c:\users\Mchel).

Anyway, I’m sure there are proper work arounds (I just created a c:\sts folder and installed into that), but prevention being better than  a cure this time I just created a user with all English characters.

  •   •   •   •   •
January 9, 2012 by Mícheál

WordPress, Google Analytics and Plugins

Today I spent a little bit of time adding Google Analytics in to the site, and found a few things that took some digging to set up. Setting up a Google Analytics account is easy, and all you have to do is add some javascript similar to this (obviously the account and domain name will be different:

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-28114660-1']);
  _gaq.push(['_setDomainName', 'michealhalpin.com']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>

Basically this code is used by Google to track the visitors to your site. On a self-hosted wordpress site like this one it’s very easy to add, I simply added this in to the header.php file. Simples!

But since I have 2 blogs, this one which runs WordPress.org software, and my cycling blog which is hosted on wordpress.com I thought I would add the functionality to the cycling blog. Because they both run WordPress I thought they would be identical: I was wrong.

Basically wordpress.com is used to host and deploy wordpress sites rather quickly. Basically it’s an all-in-solution.

WordPress.org however is different in that this is the CMS engine that you use to run your own site, on a different host. It’s more basic out of the box, and needs more to get it up and running. But the difference is that it’s a lot more customisable.

Probably one of the biggest differences is that .org sites all you to add in plugins, but the .com do not. Also you can’t edit the php files (although I stand to be corrected, I only looked at this for a few minutes earlier). (Plugins are basically small pieces of code used to add functionality to a site. For example I use the code snippet plugin to display code like the Google examples on the page. It’s a lot easier than coding the HTML manually!)

So, long story short if you want to use plugins on your wordpress site a standard wordpress.com site won’t do you, either have to get someone to host it (or host it yourself) or upgrade your wordpress account to VIP (sounds expensive)

  •   •   •   •   •