git config --global user.email "edward@delaporte.us"
git config --global user.name "Edward Delaporte"
```
+
+
+## Setup PowerShell Profile
+
+Edit your actual profile,
+```
+code $profile
+```
+
+And add something like:
+
+``` powershell
+$env:realProfile = "$HOME\dotfiles\files\Microsoft.PowerShell_profile.ps1"
+$profileContents = [string]::join([environment]::newline, (get-content -path $env:realProfile));invoke-expression $profileContents
+```
--- /dev/null
+\r
+\r
+## Client Setup\r
+\r
+1. In the Synology web interface, under 'Synology Drive', there are direct links to download the Drive client.\r
+\r
+1. Setup a sync job or two.\r
+\r
+1. You're going to want to edit XLS files.\r
+\r
+ ```powershell\r
+ winget install --id=TheDocumentFoundation.LibreOffice -e\r
+ ```
\ No newline at end of file
-$env:src = "~\src"
-Import-Module $env:src\dotfiles\psmodules\add_to_profile.psm1
-Add-ToProfile $env:src\dotfiles\files\paths.ps1
-Add-ToProfile $env:src\dotfiles\files\env.ps1
-Add-ToProfile $env:src\dotfiles\files\load_modules.ps1
+$env:src = "$HOME\src"
+$env:dotfiles = "$HOME\dotfiles"
+Import-Module $env:dotfiles\psmodules\add_to_profile.psm1
+Add-ToProfile $env:dotfiles\files\paths.ps1
+Add-ToProfile $env:dotfiles\files\env.ps1
# Delay loading PoshGit for speed.
function Enable-PoshGit {
Write-Host "+ Type 'pg' to enable PoshGit"
Write-Host 'See $env:realProfile for version controlled profile file.'
+
+# Load some modules
+$env:psmodules = "$env:dotfiles\psmodules"
+Import-Module "$env:psmodules\dash.psm1"
+Import-Module $env:PSModules\file_management.psm1
+Import-Module "$env:psmodules\fix_vpn.psm1"
+
# Let's face it, I'm about to cd into my source directory
if((Get-Location).Path -eq $HOME){ cd $env:src }
# Write-Host "Reading from $HOME\Journal\{YYYY}\{MM}-{DD}.md"
agenda.exe -path "$HOME\Journal\{YYYY}\{MM}-{DD}.md"
}
-New-Alias today Get-JournalAgenda
\ No newline at end of file
+New-Alias today Get-JournalAgenda
-
-$modPath = "$env:src\dotfiles\psmodules"
-Import-Module "$modPath\dash.psm1"
-Import-Module "$modPath\drivespace.psm1"
-Import-Module "$modPath\fix_vpn.psm1"
\ No newline at end of file
if($IsWindows){
# Some Paths that are annoying to find/restore if the installer fails
Add-ToPath "C:\Program Files\Git\cmd" # Version control is nice.
- Add-ToPath "C:\Program Files\Microsoft VS Code\bin" # One Editor to rule them all
+ Add-ToPath "C:\Program Files\Microsoft VS Code\bin" -optional # One Editor to rule them all
Add-ToPath "C:\Program Files\Git\cmd" # Version control is nice.
Add-ToPath "C:\ProgramData\chocolatey\bin" # Package management is nice.
- Add-ToPath "C:\Program Files (x86)\GnuWin32\bin" # GNU Utils - i.e. rm
+ Add-ToPath "C:\Program Files (x86)\GnuWin32\bin" -optional # GNU Utils - i.e. rm
Add-ToPath "C:\bin\x16emu" -optional # X16 Emulator
Add-ToPath "$env:src\x16-demo\tools" -optional # x16 python tools
Add-ToPath "$env:src\flutter\bin" -optional # Flutter for Dart
# Command line tools
Add-ToPath "$env:src\chart" -optional # command line chart utility edthedev\chart
Add-ToPath "$env:src\agenda" -optional # command line chart utility edthedev\chart
-Add-ToPath "$env:src\todolist" -optional # todo list utility edthedev\todolist
\ No newline at end of file
+Add-ToPath "$env:src\todolist" -optional # todo list utility edthedev\todolist
+
+
+# $env:path+=";C:\Program Files\Git\bin"
+# $env:path+=";C:\Program Files (x86)\Microsoft VS Code\"
Export-ModuleMember -Function Show-DriveSpace
Export-ModuleMember -Function Show-LargeFiles
+
+# Stay awake to allow large transfers to complete
+# without permanently giving up battery saving features
+function Invoke-StayAwake() {
+ param($minutes=90)
+ $wsh = New-Object -ComObject WScript.Shell
+ do{
+ "Staying awake for $minutes minutes"
+ $minutes-=1;
+ # Send Shift+F15
+ $wsh.SendKeys('+{F15}')
+ Start-Sleep -seconds 59
+ }until($minutes -lt 0)
+ # Thank you to http://www.zhornsoftware.co.uk/caffeine/
+}
+
+Export-ModuleMember -Function Invoke-StayAwake
\ No newline at end of file
+++ /dev/null
-
-function Show-SprintCharts(){
- $closed = Get-GHClosed
- $closed_count = ($closed | Measure-Object).Count
- Add-Content -Path ~/.chart_closed -Value "|$closed_count"
- $env:closed = Get-Content -Path ~/.chart_closed
-
- $orphans = Get-GHNoMilestone -repository SecOps-Tools
- $orphans_count = ($orphans | Measure-Object -Property updated_at -Min -Max).Count
- Add-Content -Path ~/.chart_orphans -Value "|$orphans_count"
- $env:orphans = Get-Content -Path ~/.chart_orphans
-
- $unsized = Get-GHUnsized
- $unsized_count = ($unsized | Measure-Object).Count
- Add-Content -Path ~/.chart_unsized -Value "|$unsized_count"
- $env:unsized = Get-Content -Path ~/.chart_unsized
-
- Write-Host "## Closed Issues this Sprint: $closed_count"
- Write-Host "'''sh"
- chart -var "closed"
- Write-Host "''' "
- Write-Host "## Count of Unsized Issues: $unsized_count"
- Write-Host "'''sh"
- chart -var "unsized"
- Write-Host "''' "
- Write-Host "## Count of Issues with no milestone: $orphans_count"
- Write-Host "'''sh"
- chart -var "orphans"
- Write-Host "''' "
-
-}
-
-Export-ModuleMember -Function Show-SprintCharts
\ No newline at end of file