Skip to content

Instantly share code, notes, and snippets.

View jeliasson's full-sized avatar
👋

Johan Eliasson jeliasson

👋
View GitHub Profile
@jeliasson
jeliasson / PowerShell-WeekStart-Weekend.ps1
Created September 20, 2021 11:36
A few PowerShell variables that get WeekStart, WeekEnd and Week number by a Get-Date input
# Time range
# Actual date
$DateTarget = Get-Date
# Custom date test (overrides actual date unless commenting out)
#$DateTarget = Get-Date -Date "2021-09-12 13:14:15Z"
$StartOfDay = $DateTarget | Date -Hour 0 -Minute 0 -Second 0
$StartOfWeek = $StartOfDay.AddDays(1-($StartOfDay).DayOfWeek.value__)
@jeliasson
jeliasson / Remove-Git-Sub-Module.md
Last active February 21, 2020 23:52
Remove Git Sub-module

Remove Git Sub-Module

  1. Remove sub module section from the .gitmodules file.
nano .gitmodules
  1. Stage the change
git add .gitmodules