Wednesday, March 14, 2012

Google Page Speed: Gzip and Caching, order matters

Ok so this may seem pretty simple and obvious, but it is late in the day and my brain is fried so I just wasted time on it. If you're ever using Google Page Speed and it suggests enabling caching and enabling Gzip compression, make sure you enable caching last. I just accidentally enabled caching, then went about enabling Gzip for all of my mime types. The problem is that Page Speed was (correctly) listening to my caching rules and as such, I was fooled into thinking my Gzip rules were not taking. In reality, Gzip was working fine, but the JS and CSS files were cached and thus my browser still viewed them as "uncompressed". Order matters.

Monday, March 12, 2012

GOAT Web Development Stack

Ok, real talk. There's a lot of absolute garbage out there. Defining your core quality tools is made difficult for new developers as they try to sift through the good, the bad, and the ugly.

I've put together what is my current stack of what I consider quality development tools. I've put them all on a server in a file called GOAT (Greatest of all time). It works like a personal repository for my favorite frameworks and plugins.

Here they are:


bootstrap (aka Twitter Bootstrap 2, use bootswatch.com to get a good theme.
bootstrap.colorpicker (Color picker for Bootstrap)
bootstrap.datepicker (Date picker for Bootstrap)
jquery (A no brainer...)
jquery.chosen (Nicely style SELECT elements for easy filter)
jquery.noty (The best jquery notifications plugin out there)
jquery.qtip2 - Excellent Tooltip Library
jquery.tinycon - HTML5 Favicon Manipulation Library
jquery.mobile (Slowly becoming more stable, very neat stuff so far)
jquery.mobile.bootstrap.theme (A great theme for jquery mobile)
jquery.mobile.gmap - Responsive Google Maps for mobile devices
jquery-ui.bootstrap (The bootstrap theme for jquery UI)
jquery-ui.smoothness (A simple, clean theme for JQuery UI)
knockout (Knockout.js is simply amazing MVVM. Do their tutorial and you'll see why.)
sammy (Sammy is a small library that goes well with Knockout.js for handling RESTful eventful javascript)
FuelPHP (FuelPHP is the library I've settled on for doing my MVC and so far I've very impressed)


Honorable mentions:


Foundation by Zurb (I want to use this, but Bootstrap 2 make is tough. I keep going back and forth)
jquery.tokeninput (Token input is nice but development has stopped. In the end, I went with jquery.chosen instead.

That's all I've got for now. I will try to update this as I add to it. Would love to hear suggestions or potential additions to this list of core dev tools/frameworks for web application developers.

Monday, March 5, 2012

Get Wireshark to Work in Windows 8

I came across very handy fix for Wireshark in Windows 8 was posted today by user thejoefish. http://www.reddit.com/r/sysadmin/comments/qiwdv/windows_8_and_wireshark_easy_fix/ "For those of you out there experimenting with Windows 8, you were probably upset by the fact that Winpcap won't run. If you do an upgrade from a Win7 box to a Win8 it warns you, and Server 8 just refuses to list any capture interfaces. It turns out the issue is with the installer only and not NDIS 6.2 or something. Install wireshark but don't run the winpcap installer. Then download Winpcap for x64 separately. Go to the binary, right click and choose compatibility mode. Run it in mode for Win 7 and as administrator. It installs and run without issue. It will even capture on the new Windows Server 8 built in teaming just fine." Very handy stuff for those moving to Windows 8.

Friday, March 2, 2012

PsExec with UAC Enable

Christopher Byrd has a nice little write up on using PSExec on UAC enabled machines: http://riosec.com/Windows-UAC-PsExec. I will be updating my articles accordingly with the proper syntax, but for now, this is my lazy solution.

Wednesday, February 29, 2012

JQuery Mobile Prototyping with Codiqa

JQuery Mobile Prototyping with Codiqa

Codiqa lets you mock up your JQuery Mobile apps without installing any software. My big question here is the pricing. It seems a bit steep considering there are other mockup sites out there that will likely soon add jQuery Mobile to their list of possible mockups. My big question is, why Codiqa over other mockup options? They do give you a nice 30 day trial and you can actually "use" the interface after mocking it up by sliding around all the elements. Worth a look. http://codiqa.com/

Tuesday, February 7, 2012

The Microsoft Office Safe Mode / UAC Catch-22 in Windows 7


Symptoms


When attempting to open Word, Outlook or another Microsoft Office Application, the program hangs or the ribbon or other features are missing or distorted. Being skilled troubleshooters, we know that we should start up our application in "/safe" mode to make sure that it is indeed an add-on that is causing the problem. Assuming safe mode starts up, we should (in theory) be able to disable the problem add-on.

But wait! Windows 7 with UAC enabled causes put the breaks on even these basic troubleshooting steps.

Recreating the Problem

In my case, I witnessed this on a Windows 7 SP1 computer with Microsoft Office 2007 and several COM add-ons installed. I was unable to open Word in normal mode without the Ribbon disappearing which meant I could not get to options to disable the addin. I went to run Word in safe mode by typing winword /safe in the Start Menu. Word popped up as expected so I made the assumption that this was indeed a Word add-on that was causing the issue. I went to disable the COM addon and got the following error: "This add-in is installed for all users on this computer, and can be connected or disconnected by an administrator".

This seems like a reasonable request given that we are disabling some software. The problem? This user is actually a local administrator on the machine! They should already have the needed rights to disable this add-on. Ok so how can we fix this?

The Solution


I was able to track down a solution for the error which includes right clicking Word and choosing "Run an Administrator". Unfortunately I was not able to actually perform the fix listed because my issue removed the ribbon from Word. Like I stated above, my only option was to go into Word's safe mode.

The biggest problem I ran into was when I typed "winword /safe" into the Start Menu then right clicked and choose "Run as Administrator". Oddly, this opens Word as Administrator, but in regular mode, apparently ignoring the parameters I tried passing it.

To actually fix it, you simply need to type cmd, right click, Run As Administrator. This will open an elevated command prompt. Now type: cd C:\Program Files\Microsoft Office\Office12\winword.exe /safe Now you will get Word to run as an admin, in safe mode and can remove your faulty add-ons. This should work for any application and not just Microsoft Office applications. Oh, last step, turn off UAC. :)

Tuesday, September 13, 2011

Calendar Overlay Malfunction Error in Sharepoint 2010

Symptoms


When accessing a calendar that utilizes the Calendar Overlay feature of Sharepoint. You get an error that says the error "Unable to find specified web in the given url" followed by a url. This may occur when viewing an already created calendar or when you're drilled down in to the properties for the specific overlay.

First thing, fully patch your Sharepoint server. In April 2010 there were some updates that fixed certain issues relating to this problem. You need to patch the server before doing anything.

If you're fully patched and still having the issue then you're likely viewing the site at an address that is different from the address that was logged into when the overlay was originally created. Generally this is due to accessing the site via an alternate AAM accidentally. Some ways that you'd probably do this without even knowing you're doing it:
- Visiting the site at the external fqdn and not having it set as default
- Visiting the site at the internal netbios name and not the external fqdn after setting the external fqdn it as default
- OR visiting the site at http:// and not https:// when you're using ssl as your default.


Either way, you're going to have to fix those issues before proceeding. Here are some resources I found useful to do that:

http://support.microsoft.com/kb/2025977
http://social.technet.microsoft.com/Forums/en/sharepoint2010setup/thread/884698ea-390f-465b-abb4-f1fb374f1cdc
http://support.microsoft.com/kb/2512804
http://support.microsoft.com/kb/2516471

Now, to get to this point I used all of the resources above, but my issue was still not fixed! When I went to the overlay properties for my malfunctioning overlay I'd see the following:

Sharepoint 2010 Overlay Error Screenshot

Now, let's assume that I know for a fact that https://sharepoint.example.com is valid and set as the default AAM, I'm accessing it from the proper url and I have the needed access, but overlays still aren't working. That was the case I was in. So here's how I fixed it.

Solution


Ok, in this case I really didn't have to fix anything. I did have to find a little bug in the Overlay settings page. If you had previously clicked the Resolve button and caused an error then the error remained even if you had fixed the condition. So while I had fixed the issue, the overlay settings page still displayed the same error. The only way you would notice this is if you hit the "Resolve" button and notice that the error message text remains the same as before you changed the address. So, to conclude, even though an error is displayed on the overlay settings page, you can still safely hit the Save button and all will work correctly.

This stumped me for some time because the urls I was using were so similar (I'd just switched from http to https). I didn't even notice that the error still was showing the old url and not the new url I'd entered before hitting Resolve.

All is now well with my overlays!