I wanted to move HA to my home server, I can run Hyper-V images as needed but most service I run these days are in Docker, so looked up how to do this for Home Assistant.
I was looking for a way to schedule jobs and yes windows has a task scheduler built in, however I wanted a bit more flexibility and less complexity.
On the unix platform you can use cron. It is a scheduler that uses a simple format to define the time when the process should start and the process command.
I was going to look at using it when I thought about the parsing that would be needed, I dod not want a system that much that I would write a cron parser. So pulling up search I thought to see if I could find someone who has done this. And what do you know, I found a PowerShell script that would test a cron string and return the time of execution. Bingo!
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.
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>
Now we have a RV I wanted the pi to copy media files over when it is on the network. I have a share for our DVR where the media files are placed (HD Homerun + Emby) and wanted to copy certain TV shows over automatically when the RV is home and I put it on the network.
Now I can go down the BASH scripting route but I do not know that space very well. However I do know the PowerShell space well so installing it made sense. Following the instructions Installing PowerShell on Linux I made a cheat sheet so it is faster if I have to rebuild t a later time.
So we pulled the leaver on buying a RV. However we want to be able to watch our shows on the road, simple idea however internet access is not everywhere we want to go. To to get the DVR recordings from our media centre I setup a Pi running jellyfin and then wrote a simple powershell script which runs on the Pi and when it is on and at home will pick up our main media centre ont he network and copy and shows with a file called .rvcopy in the root. That way we will always have the latest shows we recorded!
I use keyboard shortcuts a lot and in outlook I am used to the Ctrl+1/2/3/4 to go between mail, calendar, contacts, etc. In teams I found myself using Ctrl + 2 to go to the calendar which actually brings you to the Chat tab. I know I could use Ctrl + 4 but you know muscle memory…
Then I found out you can reorder all the tabs on the left, so not I have Chat at the top just like my mail Ctrl + 1 followed by Calendar which means it is Ctrl + 2 which is now very similar to Outlook!
Now that we are dealing with COVID-19, a lot of companies are getting their employees to work remotely. For some this will be great and for other who crave social interaction not so great. For me the key thing is making sure that my team feels like a team still.
Keeping the routine going is pretty important. For yourself and your team. There are lots of great posts about this so I will just list the key points.
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.