Over the past couple of months I've added more and more customization to my development machine. So much so, that I'd like to write down what I did in case I'll need to re-implement it - and maybe also help some others who might be interested.
First of all, install and use Launchy
. This small piece of software allows quick launching of programs, and learns your habits. Since it works like a search box, the first time you may need to type "visual studio" but the next time, "stu" just might be enough. For example, these days, to launch Microsoft SQL Server Management Studio, I just press alt-space, then type "sql" and hit enter.
On top of that, use the Runner plugin. It allows to set up custom commands.
For example, I have "KillDevWebServers" which runs "C:\Windows\System32\cmd.exe" with arguments "/C taskkill /IM WebDev.WebServer40.exe /F". This kills all open web-server instances created by visual studio.
Also, this will allow to run batch scripts which can automate almost anything.
start and stop a website
Command via launchy, then a batch file
%systemroot%\system32\inetsrv\appcmd stop site /site.name:<sitename to stop>
%systemroot%\system32\inetsrv\appcmd start site /site.name:<sitename to start>
Push to git (using tortoisegit command line):
C:/Program Files/TortoiseGit/bin/TortoiseGitProc.exe /command:switch /path:<path-to-code>
Create a branch via launchy, and switch to it:
A combination of
- command in launchy :
- command: "C:/automation/git/<projectname>CreateBranch.bat"
- arguments: "$$" (for forwarding the new branch's name)
- the batch file which uses mysgit
arguments "/C iisreset"
Replace hosts file and flush chrome's dns + sockets
- Create a folder in C drive C:\automation\hosts
- Install AutoHotkey, which is a macro-running program.
- Create "chromeClearDnsAndSockets2.ahk", a script to clear chrome's dns+sockets. Here is the one I'm using, as an example. It may not run on a different machine, I haven't tried it.
- Create a batch file that replaces your hosts file with the file given as a parameter, then runs that macro. Here's an example.
- Then, create as many batch files and hosts files as you need, where each batch files calls the "replacer" batch file, with the hosts file as parameter. Like so.