If you are using OpenSSH on Windows the default shell used when connecting is cmd.exe. To update Windows to use something different you need to update the registry and restart the OpenSSH service.
Continue Reading »Taken from https://andrewchaa.netlify.app/posts/2020-05-27/service-fabric-skeleton-service/ to conserve and update as needed as could not find it when I went looking for it.
On Service fabric, you can either create ASP.NET Core API service or worker process. I’m going to create a worker service today
Visual Studio Template Skeleton
- Right click on ServiceFabric project > Create a new Service Fabric service
- Choose “Stateless Service” for worker service, as Stateful is the new evil in cloud era. It will create a skeleton service project. I named it xxxx.xxxx.xxxx.xxxx.Worker
- You launch it by pressing “CTRL + F5” on Visual Studio. That’s my favorite way of deploying the new service fabric into the local dev machine cluster.
Shorten the default lengthy service name
You deploy it on to the cluster and notice that by default, the name of the service is pretty long.
Continue Reading »So, you made some commits and then realise you used the wrong author and email address. No problem, use the following command to update them all and then you can push with consistent happiness.
This assumes you are doing this in PowerShell, if in bash you may need to escape the quotes differently.
The GIT commit id is the one before the commits with the wrong author. For the Author use the format name <email@address.com>
Continue Reading »Because I am lazy I wrote a script so I can update all my machines from the one location which is the gist below. This works in powershell core. Again this is mostly for me but feel free to use as needed.
Update your $profile
to have th following environment variable set. This will allows the wid
and pid
aliases to work correctly.
$env:GIT_PERSONAL_EMAIL = "personal@personal.com"
$env:GIT_PERSONAL_USERNAME = "myname"
$env:GIT_WORK_EMAIL = "work@work.com"
$env:GIT_WORK_USERNAME = "myworknameoralias"
Script to update aliases. Add to your profile or a function in your profile that you can call when you want.
Continue Reading »This is a update to Using git aliases. A few extra commands and a bit of a cleanup. I should move it to a gist at some point.
Update: Moved the contents to a gist.
This is more for me than anyone else. If you want to move to PowerShell core in Visual Studio Code then do the following.
- Press
CTRL + ,
to open settings. - Enter
Shell: Windows
in the search box. - Scroll down to Terminal > Integrated > Shell: Windows
- Click on ‘Edit in settings.json’ and add the following.
"terminal.integrated.automationShell.windows": "C:/Users/${env:USERNAME}/scoop/apps/pwsh/current/pwsh.exe",
"terminal.integrated.shell.windows": "C:/Users/${env:USERNAME}/scoop/apps/pwsh/current/pwsh.exe",
Now when the terminal is opened it will be using PowerShell Core. As I use Scoop to install items on my computers the path above reflects that, if you have powershell elsewhere then use that path.
Continue Reading »I work with git for home and work project, I recently found you can use alias across all platforms due to the way it runs on windows. So all these aliases will work happily on git for windows and hopefully will make you work day more streamlined.
Some are from sites I have found and other I have created myself.
To access the global git configuration run the following command and then add this to the bottom if you do not have a alias section already. This command will use your default editor.
Continue Reading »The site seems to be down. This was handy for something I was playing with. References: http://web.archive.org/web/20100331135806/http://www.fnokd.com/2008/08/20/mirroring-svn-repository-to-github/ So, I’m gearing up to work on some Java+Ruby (via JRuby) stuff. The Java world still seems fairly entrenched in the cult of Subversion, while the Rubyists have gone with Git lately. I’m still wrapping my mind around Git, but with GitHub, it’s fairly easy and straight-forward. I paid my $7 for the micro account, to give me room to screw around. There’s quite a few posts about mirroring SVN to a Git repository, but I feel the need to add my own, of course. My goal is mirror the trunk of the JRuby project from Codehaus SVN to my account on GitHub. By doing this, I can track the trunk development, and also work on my own patches. I started by creating an empty repository on my GitHub account, called ‘jruby’.
Continue Reading »Case Converter was made when I wanted the text to display in a WPF UI in upper case. Probably not the best class name, but anyway. To get the code and install read on. Make any UI string uppercase. Once you have registered the resource and created the class just use the converter in the element you want converted.
<TextBlock Text="{Binding Title, Converter={StaticResource CaseConverter}}"/>
Add the following element to the XAML, usually in Window.Resources and ensure that you have registered your namespace for local to the namespace of your application. e.g. xmlns:local=“clr-namespace:ExampleApp”
Continue Reading »Procmon is created by sysinternals and should be deployed to any server in your enterprise (and desktop) it allows you to see what file, registry, network and processed & thread activity is happening on your system. I just used to to work out why VS 2010 was not installing, it turns out it iterates through all the drives on your system including your mapped drives. As I had just been playing with WebDav I had a mapped WebDav drive which was very slow to access. Looking at proc mon I could see straight away what the issue was and I disconnected the drive. Problem sovled!
Continue Reading »