Using git aliases part two

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.

Using PowerShell core in Visual Studio Code on windows

This is more for me than anyone else. If you want to move to PowerShell core in Visual Studio Code then do the following.

  1. Press CTRL + , to open settings.
  2. Enter Shell: Windows in the search box.
  3. Scroll down to Terminal > Integrated > Shell: Windows
  4. 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 »

Using git aliases

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 »

Filling your calendar for the week, increase productivity! Mileage may vary

I like to ensure my calendar gets filled for the next week, this way I know what is happening and it is hard to book a last minute meeting to surprise me. I guess this is a productivity hack. If you book more than a week out then you can take whatever time you want that is open.

Ideally no one books last minute but they do and it is really annoying to deal with. Just call me!!

Continue Reading »

New PowerShell module for Home Assistant

So after making the PowerShell script for Home Assistant I decided to spend a hour and pull it together to be a full module and push it up to GitHub. This is now in place and support just turning a switch entity on and off.

Installation

Install-Module -Name PoshHomeAssistant -Scope CurrentUser

Usage

Before you can use it set the configuration, this can be done with the following command, set the key and url to match your environment.

Continue Reading »

iPhone hotspot issues? Getting it to work with windows.

Had an issue the iPhone hotspot would not work on windows, it would see the network and try to connect, on the phone the hotspot bar at the top would appear and disappear. Simple solution… Go to settings and change the name of your iPhone and remove any single quotes (’) from the name. Go back and turn the hotspot on and enjoy the connection. Well it worked on my computer :)

Continue Reading »

Getting a DietPi image running on Hyper-V

Why? Because it is faster to test installs and adding items to the DietPi installer with snapshots! Also it makes a great small Linux installation to run other items off in Hyper-V.

  1. Go get the VirtualBox VMWare x64 image from the DietPi site. http://dietpi.com/#five
  2. Download the QEMU disk image utility from https://cloudbase.it/qemu-img-windows/
  3. Extract the VirtualBox VMWare image, it is a ova file. At this point we need to take the actual disk image out of this file. I use 7zip for this purpose. Right click on the ova file and open archive. Then extract the VMDK file out.
  4. Extract the QEMU disk image utility to the same folder as the VMDK file and then run the following command changing the file names as needed:

.\qemu-img.exe convert ‘.\DietPi_v120_VirtualBox-x86_64-(Jessie)-disk1.vmdk’  -O vhdx -o subformat=dynamic ‘.\DietPi_v120_VirtualBox-x86_64-(Jessie)-disk1.vhdx’

Continue Reading »

Getting HP Officejet Pro 8620 scan to network working

So, tried to do this. Failed… Why? not because there was a issue with the share or the user/pass combination. It was the SMB process and stack locations in the I/O request packets (IRPs) that are used by Windows. Reference: https://technet.microsoft.com/en-us/library/cc734424(v=ws.10).aspx

To fix

To increase IRPStackSize for the server:

  1. Click Start, click Run, type regedit, and then click OK.
  2. Locate and then click to select the following registry subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Lanmanserver\Parameters
  3. On the Edit menu, point to New, and then click DWORD Value.
  4. Type IRPStackSize, and then press Enter.
  5. Right-click IRPStackSize, and then click Modify.
  6. In the Value data box, ensure decimal is selected and put in 20. Increase by 2 until it works. I ended up using 28.

Restart the server service to test or restart your PC. The process restart is faster :)

Continue Reading »

Developing Home Assistant on Windows using the Subsystem for Linux

I love Home Assistant and use it to control my house. I run it on a Pine64 board and it handles everything. However for developing and modifying it I want to have a slightly better environment than nano and a console screen :) So using the Subsystem for Linux I have a Linux based setup to run the hass instance in and can use Visual Studio code to develop the modules as I go, best of both worlds.

Continue Reading »