CATEGORY: Applications

Cheap Macbook Pro Docking Solution for about $30

I typically prefer developing on my desktop and large dual screen monitor setup as opposed to my Macbook. Recently, I’ve gotten into more PHP development and developing on the Mac is proving to be a more enjoyable experience only because Windows is still a second class citizen for most PHP libraries/tools. I still wanted a larger screen setup, so I considered buying a docking station to hook up to a larger monitor but I soon learned they feature the ‘Mac Penalty’ in that they cost more than they should just because it’s for Apple products.

I already have two large monitors and figured my Macbook could serve as third screen. Then I did some thinking and realized I could use one of the monitors for both computers. Assuming you have two HDMI screens already hooked up to your desktop, this would save you $150+ and still allow you to be more productive.

  1. Get a copy of Synergy (http://symless.com/) for $10. It’s open source and can be built if you have the time, but a one time fee of $10 saves me the hassle of doing so. With this, you can share your desktop keyboard across all your computers with the one license and it’s cross platform so Linux support is included too.
  2. Purchase an auto HDMI switcher. I purchased the PORTTA PET0301S 3×1 Port HDMI Switch/Switcher for about $9.
  3. Be sure to get 2 HDMI cables if you don’t already have them on hand. I don’t like the Amazon Basic brand for these as I’ve had problems with the Mac and those cables hooking up to larger screens.
  4. Install Synergy on the desktop as a server. Install on the Macbook as a client and it should autoconnect.
  5. Plug the HDMI cable from the computer into the HDMI switcher, and plug the spare into the Macbook pro. Plug the “Out” end into the monitor.

When you plug your HDMI cable into the Macbook, the HDMI switcher will automatically switch to it and project the Macbook. Synergy will auto-connect as long as it’s running on both and you can share the mouse and keyboard between both and work seamlessly.

If you have an iPad and want to turn that into an additional screen, grab a copy of Duet Display on your desktop/Macbook and install on your iPad for $15.99, and viola, instant portable second screen!

Windows Server 2008/2012 Blue Screen after Login – No Desktop

One of my teammates was working on a Windows server and needed to access IIS to complete a Sitecore upgrade on the machine. After logging in, he was reporting that he only saw a blue screen with no user interface. I logged in under the administrator account and ran into the same thing. Here’s how I was able to reset:

  1. CTRL + ALT + END
  2. Start Task Manager
  3. Click processes tab and find all instances of “explorer.exe”
  4. Right click each process and selected “End process tree”
  5. Once all instances are gone, select the Applications tab
  6. Click new task button
  7. Type “explorer.exe” without the quotation marks
  8. Click OK.

If it’s a user account and you can login to the administrator account and see the UI, you can load remote desktop as admin.

  1. Start -> Run
  2. Type “mstsc /v:servername /console /admin” in order to access the server.
  3. In “Windows Taks Manager”, go to the Users tab and proceed to do a right click over the account that you want to “Log Off”, select log off.

This should free the locked session used by that account and bring the UI back.

 

Visual Studio 2013 package did not load correctly

Visual Studio Error MessageToday I loaded up Visual Studio to continue work on a project and created by a random bunch of errors. All were complaints that various packages could not be loaded. The one I captured was:

The ‘JavascriptWebExtensionsPackage’ did not load correctly.’ The problem may have been caused by a configuration change or by the installation of another extension.

I had just installed SyncFusion’s Essential Studio which apparently screwed something up. I tried doing a repair on Visual Studio which unfortunately did not work.

I was able to fix it by following these steps:

  1. Close Visual Studio Open the *Users*\AppData\Local\Microsoft\VisualStudio\12.0\ folder
  2. Rename the ComponentModelCache folder
  3. Restart Visual Studio.

Visual Studio should now rebuild the cache and no longer display the error messages.

ASP.NET MVC Model Generator

In making the switch to ASP.NET MVC, I’ve moved away from using my old Data Access Layer that I’ve used for years and have opted to use Dapper as my ORM of choice in the quest for optimal performance. My DAL was actually pretty optimized for WinForms and WebForms (using straight SQL Queries and SQL parameters) but mapping it to models wasn’t something I had in mind when I created it. I’m finding Dapper takes some getting used too but it is still pretty fast. The downside is that writing the code for Models to wire it up is proving to be a little tedious.

To that effect, I wrote a little application that has helped me generate the models from a database dynamically. It’s in it’s infancy stages and something I cobbled together in less than 8 hours but it works. I’ll add more features too as time goes on if there’s enough interest or to satisfy my own needs. In the meantime, I’m open sourcing the project as it may help others and I’d love to see it become something grander if others are willing to contribute to it. There’s also some useful bits of code that others may find useful to reference like dynamically reading fields from a database, pluralization/singularization of words, amongst others.

You can find the repository on Github: https://github.com/gregvarghese/MVCModelGenerator

SourceTree Crashes on Load

sourcetree errorI’ve recently started using Git for development and while I am getting used to the command line tools on Windows, I have been using Atlassian’s free tool, SourceTree to help manage my code. Recently I’ve run into an issue where SourceTree crashes on start up.”Oh dear. We’re sorry, but SourceTree just crashed. How terribly embarrassing.”

I submitted an issue (https://jira.atlassian.com/browse/SRCTREEWIN-3011) and received a response that didn’t solve the issue. I submitted a follow up but never heard back so I did some further digging and found that SourceTree was crashing because it corrupted a repo and was still trying to load it back up on start up. The application does not exit gracefully or even give you the option to start in a safe mode which loads nothing.

To prevent it from opening the repo on start up:

Open %localappdata%/Atlassian/SourceTree/opentabs.xml in notepad or another editor.
Delete the problem repo.

Viola! No more SourceTree crashes on start up.

Mac Outlook 2011 Reply All Includes My E-mail (with solution)

I’ve started a new job and was assigned a Macbook for my daily work. I’ve found equivalents for most of my applications. Personally, I find the native Mac apps are just extremely underpowered for my computing needs. I hate Mail especially, and even more so how all the apps are split out into separate apps. Luckily I have Office for Mac. Not so luckily, Outlook Mac 2011 is not as well designed as Outlook for Windows in so many ways.

One of the bugs I ran into was the “Reply All” bug where your e-mail is included in the CC field. It’s rather annoying having to choose from having to manually delete your address or having an extra e-mail to delete from your inbox.

The fix turned out to be rather simple for me. It turns out that Outlook for Mac isn’t very smart. It doesn’t seem to be able to tell which address you’re sending the e-mail from even though it’s doing the sending. When my account was initially setup, the company set it up with one of their subsidiary domains which was incorrect. Rather than creating a new inbox, they simply created an alias for the domain but never updated my configuration.

To fix the issue, do the following:

  1. Go to Tools -> Accounts.
  2. Ensure that your e-mail address field is set to match the address you are sending from.

My e-mail address had been set to the old one and still worked due to the aliasing. As soon as I updated the address to match the corrected domain, the reply all stopped including my e-mail address.

 

ESET AntiTheft Causes Dell Machines to Lose Permissions on C:

Eset Logo

I just spent the past two days complaining about Windows 8 to everyone I know because of how awful the experience is. I installed Windows updates, rebooted, and the system stops working.

It turns out it wasn’t Windows causing the problem but ESET AntiTheft on Dell laptops. It turns out there’s a permission bug specific to Dell machines when ESET creates it’s ghost account and instead of giving it restricted access, the system essentially copies the permissions and then changes everything on the C: drive to a state where the permissions are no longer accessible.

Unfortunately, the only known fix at this point is to contact ESET support. I called their support line in North America and the tech knew about the issue right away. You’ll have to reboot into safe mode, and then get them to remote in to install a utility that runs a script that resets the permissions.

Contact Info here: http://www.eset.com/us/about/contact/

The tech assured me they are working with Dell to get this issue resolved so until they do, make sure you don’t activate ESET’s AntiTheft on the Dell machine.

Uninstalling Trend Micro Client/Server Security without a Password

Lost or forgot your Trend Micro Client/Server Password? How about inheriting a computer that had the software installed by an IT team or consultant that won’t give up the password? I had to work on a network with the latter and it’s rather annoying. The product is utter crap as the machine is spyware infested even though the antivirus is running and present. I went to uninstall it but can’t because the previous person/company password protected it and nobody has it.

Here’s how to bypass the protection:

  1. Load up Regedit and browse to:
    HKEY_LOCAL_MACHINE\SOFTWARE\TrendMicro\PC-cillinNTCorp\CurrentVersion\Misc.\Allow Uninstall
  2. Change the value to 1.

Now you can uninstall TrendMicro’s crappy product and replace with a real solution like Eset.

Drobo Dashboard Can’t Connect to Drobo when ESET Firewall is Active

Have a Drobo storage unit? If you have ESET Smart Security Firewall enabled, you’ll probably find Drobo Dashboard can’t connect while the firewall is on even after adding all the required ports and services to ESET’s rules from the Drobo online help site (http://goo.gl/iVKVU).

After enabling the detailed logging in ESET, I found that ESET’s firewall was flagging Drobo Dashboard as an intrusion attempt and blocked it. From the Drobo help page (http://goo.gl/iVKVU):

Drobo Dashboard connects to port 5000 and then randomly picks a port in the range for broadcasting.

This is definitely not the most intelligent way to build a product when users who are trying to secure their home or business network and it’s no wonder that ESET flagged the behavior as suspicious. Luckily there’s a fix to keep ESET from blocking the Drobo connection:

  1. Make sure you add the rules as per Drobo’s site (http://goo.gl/iVKVU).
  2. Open the main program window by clicking ‘Start’ -> ‘All Programs’ -> ‘ESET’ -> ‘ESET Smart Security’.
  3. Click on ‘Setup’ on the left, and then click ‘Enter Advanced setup’ on the right to open the Advanced Setup tree.
  4. From the Advanced Setup tree on the left, Expand ‘Network’, and Click on ‘Personal Firewall’, and then select ‘Interactive mode’ from the Filtering mode drop-down menu on the right.
  5. From the advanced setup tree, click ‘Personal Firewall’ -> ‘Rules and zones’. Click the ‘Setup…’ button in the Trusted zone section and then choose ‘Allow sharing’. Click ‘OK’.
  6. Click ‘Personal Firewall’ -> ‘IDS and advanced options’. In the ‘Allowed services’ section, make sure all services are selected. Click ‘OK’.

Drobo Dashboard should now be able to connect to the unit with no issues.

Kill Multiple Processes at Once Via Command Line with Taskkill

Ever have a program or process that doesn’t end properly and runs in the background continuously?

I recently encountered this issue with VLC on one Windows 7 machine where it keeps the process never terminates. Since I never reboot the machine for other than Windows Updates, this amounted to 633 copies of VLC running in memory. Each process only used about 633k so it wasn’t an astronomical memory hog but multiply that by 633, you begin to feel the machine slowing down. Task Manager doesn’t let you kill multiple processes in bulk and I didn’t want to go through killing them one by one or rebooting.

The solution? Good old command line. Open up command prompt (start -> run -> cmd.exe). This snippet will kill all processes that start with the taskname:

To kill all VLC processes, you’d use:

All running VLC processes will be terminated automatically.