Monday, March 7, 2016

Creating self signed certificates with makecert.exe for development

Creating self signed certificates with makecert.exe for development


makecert.exe ^
-n "CN=CARoot" ^
-r ^
-pe ^
-a sha512 ^
-len 4096 ^
-cy authority ^
-sv CARoot.pvk ^
CARoot.cer

pvk2pfx.exe ^
-pvk CARoot.pvk ^
-spc CARoot.cer ^
-pfx CARoot.pfx ^
-po Test123



Source

Tuesday, February 23, 2016

Friday, February 19, 2016

What tools, frameworks, etc do you find essential for development?

Usually I choose depending on the project requirements. Here are the categories of tools/frameworks I find useful:

IDE/Editors:
  • WebStorm
  • Visual Studio
  • Visual Studio Code
  • ReSharper
  • Notepad++
  • LinqPad

Databases:
  • MSSQL
  • MongoDB
  • Entity Framework

Network:
  • Fiddler

Communication/Documentation/Sharing
  • Skype
  • Hangout
  • Slack
  • Google docs
  • Wiki
  • Dropbox

Static analysis
  • nDepend
  • FxCop

Code quality
  • ESLint
  • StyleCop

Code coverage
  • nCover

CI
  • Team City
  • Jenkins
  • Msbuild
  • gulp

QA/Testing
  • nUnit
  • moq
  • Autofac

API testing
  • Postman
  • SoapUI

Browsers:
  • Google chrome

Website performance:
  • YSlow
  • Google webmaster tools
  • JSPerf

Web prototyping
  • JSFiddle/JSBin/Plunkr

Web development:
  • WebAPI
  • ASP.NET MVC
  • Bootstrap
  • jQuery
  • AngularJS
  • Google Analytics

VCS:
  • Github
  • Svn + AnkhSVN
  • tfs

Node.js
  • Express
  • Socket.io
  • Q
  • Mocha
  • Npm
  • web-inspector

VM/Containters
  • VMWare
  • Virtual Box
  • HyperV
  • Docker

Cloud:
  • Azure
  • AWS
Password manager
  • Keepass
    • Keepass2Android



Thursday, February 18, 2016

Debugging Node.js using Node.js Tools for Visual Studio (NTVS)

Node.js Tools for Visual Studio (NTVS) include advanced debugging features for debugging Node.js applications, like advanced breakpoints, and remote debugging of Node.js processes running on any OS (Windows, Linux, MacOS), or hosted on Windows Azure.

https://github.com/Microsoft/nodejstools/wiki/Advanced-Debugging

Tuesday, February 16, 2016

Load testing web sockets with Node.js - Fine tuning TCP/IP on Windows

Load testing WebSockets with Node.js


I was doing a load testing for a socket.io server. After creating a small client in Node.js using socket.io-client I faced with a limit of about 16K connections trying to run it on Windows 7.

It turned out that by default, dynamic ports are allocated between ports 49152 and 65535 (for a total of 16384 ephemeral ports). Using netsh allows to set both the starting port and port range.


 netsh int ipv4 set dynamicportrange protocol=tcp start=1025 num=64511


After running the command I was able to run a Node.js cluster of 8 processes each establishing 5000 connections. That makes 40K connections in total.

I also found a good article about stress testing node.js application

Tuesday, July 14, 2015

RabbitMQ

http://spring.io/blog/2011/04/01/routing-topologies-for-performance-and-scalability-with-rabbitmq/

Windows Service Bus 1.1

Installing Windows Service Bus for Windows Server  

http://joe.blog.freemansoft.com/2013/02/installing-microsoft-message-bus-for.html

Service Bus for Windows 1.1

https://roysvork.wordpress.com/2014/06/14/developing-against-service-bus-for-windows-1-1/
https://msdn.microsoft.com/en-us/library/jj841075.aspx
https://pablocastilla.wordpress.com/2013/06/18/publisher-subscriber-with-windows-azure-service-bus-and-wcf/


Authentication and Authorization

https://msdn.microsoft.com/en-us/library/dn205161.aspx
https://msdn.microsoft.com/en-us/library/dn441400.aspx


AMQP on Service Bus 1.1


https://social.msdn.microsoft.com/Forums/en-US/88a343a0-310d-462d-b96c-c54f730b7746/amqp-on-service-bus-11-onpremise?forum=servbus


SDK

https://social.msdn.microsoft.com/Forums/azure/en-US/88fb5677-6824-43dc-a1f1-0126308c4045/service-bus-for-windows-server-sdk?forum=servbus

Monday, May 25, 2015

Inverting direction of mouse scroll wheel in Windows 7

There is a registry setting named FlipFlopWheel that does this! HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\HID\VID_???\VID_???\Device Parameters. There might be multiple mouse entries. The default value for FlipFlopWheel should already ready 0. Change into 1 to invert scrolling. Reboot or possibly replug in mouse for changes to take effect.
To get the VID_??? number you have two options:
  1. Go to the mouse control panel, click the Hardware tab, then click Properties.
    Now in the HID-compliant mouse Properties window click the Details tab and select the Device Instance Path property. The registry path is in there. You only have to unplug and plug back in my mouse for this to take effect.


Wednesday, May 14, 2014

TFS switch working copy to another branch

Problem

I assume that you already have a working copy of $/branch1.
Let's say it's checked out to local folder c:\inetpub.
And you want to remap this working copy to $/branch2 without re-downloading everything again.

Solution

  1. First you'll need to unmap existing branch.
  2. Map working copy folder to new branch.
  3. Apply remap recursively.

Run the following commands from command line:

tf workfold /unmap $/branch1
tf workfold /map $/branch2 c:\inetpub
tf get c:\inetpub /remap /version:T /recursive


You'll probably want to unshelve a shelveset from another TFS branch afterwards.


Wednesday, February 19, 2014

NEWSEQUENTIALID() (Transact-SQL)

Creates a GUID that is greater than any GUID previously generated by this function on a specified computer since Windows was started. After restarting Windows, the GUID can start again from a lower range, but is still globally unique. When a GUID column is used as a row identifier, using NEWSEQUENTIALID can be faster than using the NEWID function. This is because the NEWID function causes random activity and uses fewer cached data pages. Using NEWSEQUENTIALID also helps to completely fill the data and index pages.
Important noteImportant
If privacy is a concern, do not use this function. It is possible to guess the value of the next generated GUID and, therefore, access data associated with that GUID.