Wednesday, May 9, 2018

Adding a new resource to Microsoft High Availability Cluster

The following was tried on Windows Server 2012 R2

Here I am giving an example of a Service; you can start an application or a script or a multitude of options that comes with the cluster software

1.  Bring up the Failover Cluster Manager

1.Right click on computer, click manage
2.Select Tools à Failover Cluster Manager

2.  Adding Role

1.Expand down to Roles
2.From Right side, click Create Empty Role
3.“New Role” is created
4.Click on “New Role”
5.Select properties, and set Name as “My Service” or any name you prefer

3.  Adding your service

1.Right Click on newly created “My Service” Role
2.Pick Option “Add Resource”à Generic Service
3.Pick “Your Servie To Use” from list and click Next, Next and Finish

4.To Start the service, Right click again on “My Service” and select “Start Role”

Monday, December 11, 2017

Unity 3D Adding MouseLook from Standard assets gives error - The script needs to derive from MonoBehaviour

You get this error trying to add MoseLook from Assets\Standard Assets\Characters\FirstPersonCharacter\Scripts
Can't add script behaviour MouseLook. The script needs to derive from MonoBehaviour!

You can use the alternative SimpleMouseRotator from Assets\Standard Assets\Utility

Sunday, December 3, 2017

Adjusting vim window size for higher resolutions (ex: 4k monitors)

vim loads with a tiny window screen by default in a 4k monitor.



To fix,

  1. Pick a font with right size using Edit --> Select Font you like so the window looks nice. 
  2. Once the window looks good, use below to find the current font settings
  3. Press Shift and :
  4. Type in set gfn? and hit Enter
  5. You should see the current font setting. For example, I got guifont=Consolas:h10:cANSI:qDRAFT
  6. Press Shift and :
  7. Type in e $MYVIMRC and hit Enter
  8. You will now be eiditing your _vimrc file. In windows you can find this file in "C:\Program Files (x86)\Vim" assuming default vim installation options
  9. Note: You may not have permission to write this file. If this is the case, please launch with Admin privileges or open the file in your favorite text editor with Admin privileges
  10. Enter Line from (5) as the first line of the file after adding set to the front. Example set guifont=Consolas:h10:cANSI:qDRAFT
  11. Note: if there are spaces, make sure to add a slash \ just before it.  
  12. Save the file and restart it
My _vimrc after update below

Friday, December 1, 2017

C# how to initiate a List via constructor

Example of a string List initialization in one line below


//Create list strCollection and assign string A, B, C & D to it!
List<string> strCollection = new List<string>() { "A", "B", "C", "D" };


Convert C# foreach loop to process in parallel

Note: this is a C# 4.0 feature

The first loop run in a serial matter, and the second one parallel. First one is guaranteed output ABCD, but the second write these characters in a random fashion

List<string> strCollection = new List<string>() { "A", "B", "C", "D" };
// Process one at a time
foreach (string str in strCollection)
{
    Console.WriteLine(str);
}
// Process in parallel
System.Threading.Tasks.Parallel.ForEach(strCollection, str =>
{
    Console.WriteLine(str);
});


Friday, October 27, 2017

Unity 3D freezing on launch splash screen, and subsequently showing a grey screen (after a while)


I have faced this issue on a fresh install, version 2017.2. Uninstalling everything and installing fresh did not help at all.

Logs here %localappdata%\Unity\Editor\ shows something like below
Error loading file:///C%3A%2FUsers%2FYOURUSERNAME%2FAppData%2FRoaming%2FUnity%2FPackages%2Fnode_modules%2Funity-editor-home%2Fdist/index.html#/login

To fix  
go to C:\Program Files\Unity\Editor\Data\Resources\Packages

You can see 4 tgz files

 1. unity-editor-home.0.8.30.tgz
 2. unityeditor-cloud-hub-0.0.15.tgz
 3. unityeditor-collab-history.0.6.14.tgz
 4. unityeditor-collab-toolbar.0.7.15.tgz

Use an unarchive program (I used 7-zip file manager) to open each one of these and extract contents (dist folder and package.json file) to your Roaming folder
C:\Users\YOURUSERNAME\AppData\Roaming\Unity\Packages\node_modules

After extract, the folder looks like this.. 
..\AppData\Roaming\Unity\Packages\node_modules\unity-editor-home 
..\AppData\Roaming\Unity\Packages\node_modules\unityeditor-cloud-hub 
..\AppData\Roaming\Unity\Packages\node_modules\unityeditor-collab-history 
..\AppData\Roaming\Unity\Packages\node_modules\unityeditor-collab-toolbar 

and as an example, unity-editor-home like below (one level subfolders shown)
..\AppData\Roaming\Unity\Packages\node_modules\unity-editor-home\dist 
..\AppData\Roaming\Unity\Packages\node_modules\unity-editor-home\package.json 
..\AppData\Roaming\Unity\Packages\node_modules\unity-editor-home\README.md

Monday, August 14, 2017

Manually creating a skype for business meeting without outlook plugin

Need to create a Skype for business meeting without access to outlook or outlook plugin? Follow these steps... The screens were captured from Skype for Business 2016.


1. Click the meet now button on Skype last tab (calendar)


2. The meeting window opens. In bottom right corner, click the round button and select “Meeting Entry Info”


3. Meeting Entry info popup now shows. “Click Copy All Info” and paste into an email or the meeting invite body text


Turn on Windows 11 Fast Boot

If windows starting is slow, to enable windows 11 fast startup/boot,  Press Windows + R, type powercfg.cpl, and hit Enter.  This will direct...