SharePoint 2013 Prerequisite Installer Failing – Unable to Install IIS

Literally been banging my head against the table, wall and floor over this one. I kept getting the error you can see below when trying to run the SharePoint 2013 prerequisite installer:

After a LOT of research and trying a bunch of different “solutions”, all completely failing to fix the issue, I look into the error log file. I know, right. What a nerd!? There is referenced trying to use a “ServerManagerCMD.exe” in the system32 directory. I looked and could only find a “ServerManager.exe”.

“Well shit”, I thought to myself. Microsoft is bloody amazing and SharePoint is the cherry on top of the cake.

So to fix this, I copied the “ServerManager.exe” file and renamed it to be “ServerManagerCMD.exe”:

And surely enough, after closing the installer and retrying, everything went swimmingly!

Enjoy!

Hide Tags from WordPress Blog Posts

So you want to hide tags from your WordPress posts? Easy…

To remove the tags line, you need to find out how to reference it and change its style using CSS. This might sound alien and weird but trust me, you can do it. Or just post a comment if you’re having difficulty 🙂

  1. Open your website, open a post and open the dev tools in your browser. This is usually done by pressing F12
  2. Look at the screenshot below and follow the step:
    1. Press where arrow #1 hints to
    2. Hover over the “Tagged” section as arrow #2 shows
    3. Finally, see the name or ID that is given to that object (Mine is tags-links)

 

3. Now that we have that, we can add some CSS to our site to make this not appear.

4. Go into Appearance -> Customize -> Additional CSS

5. Here we will add the following lines (Note that you should replace this with whatever you found in section 2.3 above):

.tags-links{
    display:none;
}

6. You can see this below:

7. Now when we refresh the page, you should see that your tags have gone completely from all your posts!

Enjoy!

MAC Address Lookup API Using PowerShell

Meet macvendors.com! I’ve used this website quite a bit in the past and recently saw that they have an API. This means I can query MAC address vendors using PowerShell instead of loading the site every time.

So I quickly threw together a small test to see if this would work using Invoke-WebRequest. You can see this below:

$mac_example = "3C-07-71-75-BC-32"
Invoke-WebRequest -Uri "https://api.macvendors.com/$mac_example"

This returns the following information:

StatusCode        : 200
StatusDescription : OK
Content           : Sony Corporation
RawContent        : HTTP/1.1 200 OK
                    Connection: keep-alive
                    x-request-id: lhgjrrs7mf0desm40sifji9reoehi08b
                    Content-Length: 16
                    Cache-Control: max-age=0, private, must-revalidate
                    Content-Type: text/plain; charset=utf-8...
Forms             : {}
Headers           : {[Connection, keep-alive], [x-request-id, lhgjrrs7mf0desm40sifji9reoehi08b], [Content-Length, 16],
                    [Cache-Control, max-age=0, private, must-revalidate]...}
Images            : {}
InputFields       : {}
Links             : {}
ParsedHtml        : mshtml.HTMLDocumentClass
RawContentLength  : 16

This provides with a lot of useless information. All I really want is the content field which contains the manufacturer information. So what I’m going to do is wrap the Invoke-WebRequest in brackets and select the content field as shown below:

(Invoke-WebRequest -Uri "https://api.macvendors.com/$mac_example").content

Which simple returns “Sony Corporation”. Perfect. Enjoy!

FizzBuzz in C++

Something really out of my comfort zone here. I completed the C++ course on codecademy and did what I normally do when I’m learning a new programming language. I try to make the FizzBuzz game in as many different ways as I can to get used to the syntax and different operations.

This is was the first attempt at it and I think the easiest to do. It’s not clean but I like learning and you need to make mistakes in order to really learn something:

#include <iostream>
using namespace std;

int main() {
    for (int i = 0; i < 101; i++){
        if (i % 5 == 0 & i % 3 == 0){
            std::cout << "FizzBuzz\n";
        }else if (i % 5 == 0){
            std::cout << "Fizz\n";
        }else if (i % 3 == 0){
            std::cout << "Buzz\n";
        }else{
            std::cout << i << "\n";
        }
    }
}

My second iteration was a little more sophisticated and would make any alterations to the rules of FizzBuzz easier to account for:

#include <iostream>
#include <string>
using namespace std;

int main() {
    for (int i = 0; i < 101; i++){
        string output;
        output = "";
        
        if ( i % 5 == 0 ){ output += "Fizz"; }
        if ( i % 3 == 0 ){ output += "Buzz"; }
        if ( output == "" ){ output = to_string(i); }
        cout << output << "\n";
    }
}

No doubt that I will be jumping back to create new ways when I have the time. Let me know what you come up with.

Enjoy!