--- /dev/null
+## Clean Microsoft Cruft from a list of emails
+
+Clean a copied list of Microsoft Email Addresses for re-use:
+
+If they're all on one line:
+
+```regex
+:s/[^<]+<([^>]+)>;/\1;/g
+```
Alt+Shift+(1 through 6):
1. Journal: New Journal Note
- 2. Journal: Open Today
+ 2. View: Toggle Zen Mode
3. Search: Focus on Search View
- 4. Source Control: Focus on Source Control View
- 5. Remote Explorer: Foucs on Remotes
+ 4. View: Toggle Terminal
+ 5. View: Toggle Maximized Panel (Helpful for expanding terminal upward)
6. View: Toggle Primary Side Bar Visibility
+ Alt+Home (Web Home) - Journal: Open Today
+ Alt+Right (Web Forward) - Journal: Open Tomorrow
+ Alt+Left (Web Back) - Journal: Open Yesterday
+
+> Tip: When reviewing shortcuts in VSCode, set the search to `User` to see your own.
+> Tip: There is an option to `Reset Keybinding` in the right-click menu.
+
## Shortcuts JavaScript
I have a bit of JavaScript in the HTML file I use for my homepage. It causes the above buttons 1-6 to map to whatever I've set my 6 most visited sites to.
-#WebDriverException: Message: unknown error: cannot determine loading status .EXAMPLE
-# . C:\src\dotfiles\Microsoft.PowerShell_profile.ps1
-
-# Courtesty of MKletz
-# Get-ChildItem -Path 'C:\Repos' -Filter "*.psd1" -Recurse | ForEach-Object -Process {
-# $Path = Split-Path -Path $_.Directory -Parent
-# $env:PSModulePath = $env:PSModulePath + ";$($Path)"
-#}
-# $env:PSModulePath = $env:PSModulePath.Replace("\\ad.uillinois.edu\techsvc\home\$($ENV:USERNAME)\Documents\PowerShell\Modules;",'')
-
$env:src = "~\src"
-if($IsWindows){
- $env:src = "c:\src"
-}
-
-if($IsWindows){
- # Some Paths that are annoying to find/restore if the installer fails
- $ENV:PATH+=";$env:src\bin" # anything else I need
- $ENV:PATH+=";C:\Program Files\Microsoft VS Code\bin" # One Editor to rule them all
- $ENV:PATH+=";C:\Program Files\Git\cmd" # Version control is nice.
- $ENV:PATH+=";C:\ProgramData\chocolatey\bin" # Package management is nice.
- $ENV:PATH+=";C:\bin\x16emu" # Package management is nice.
- $ENV:PATH+=";C:\Program Files (x86)\GnuWin32\bin" # GNU Utils - i.e. rm
- $ENV:PATH+=";C:\PENGUIN" # Flag to ensure my profile kicked in.
- $ENV:PATH+=";$env:src\x16-demo\tools" # x16 python tools
- $ENV:PATH+=";$env:src\flutter\bin" # Flutter for Dart
-}
-else {
- $ENV:PATH+=";$env:src/bin" # anything else I need
- $ENV:PATH+=":$HOME/x16/x16-emulator" # x16 Emulator
- $ENV:PATH+=":$HOME/src/x16-demo/tools" # x16 python tools
-}
-
-# Command line tools
-$ENV:PATH+=";$env:src\chart" # command line chart utility edthedev\chart
-$ENV:PATH+=";$env:src\agenda" # command line chart utility edthedev\chart
-$ENV:PATH+=";$env:src\todolist" # todo list utility edthedev\todolist
-$env:todolist = "C:\Users\delaport\Journal\"
-# New-Alias todo todolist
-
-# alias renumber $HOME/src/x16-demo/
-
-$env:Journal = "~\Journal" # allows cd $env:journal
-# $env:minion = "$env:src\minion"
-
-# Import some home grown PowerShell modules, if they are installed.
-#
-$modPaths = Get-Childitem -ErrorAction Ignore -Path "$env:src\dotfiles\psmodules"
-# $modPaths += Get-Childitem -ErrorAction Ignore -Path "$env:minion\psmodule"
-
-# https://github.com/uillinois-community/powershell-scripts
-# $modPaths += Get-Childitem -ErrorAction Ignore -Path "$env:src\powershell-scripts\modules"
-
-# Windows Only Modules
-# if($IsWindows){
-# $modPaths += Get-Childitem -ErrorAction Ignore -Path "$env:src\dotfiles\win_psmodules"
-# }
-# if($modPaths.length -eq 0){
-# Write-Host "No modules found."
-# }
-
-# $enabledMods = 'dash.psm1','docker.psm1';
-# $modPaths | ForEach-Object {
-# $fileName = $_.FullName
-# if($enabledModules -Contains $_.Name ){
-# if($filename -Like "*.psm1") {
-# Import-Module $fileName
-# Write-Host ">> Loaded $fileName"
-# }
-# }
-# }
-
-
-
-# Linux-like up/down in shell
-Set-PSReadlineKeyHandler -Key UpArrow -Function HistorySearchBackward
-Set-PSReadlineKeyHandler -Key DownArrow -Function HistorySearchForward
-Set-PSReadlineOption -HistorySavePath $env:src\PSHistory.log
-
-# Minion alias commands - 'today'
-# . C:\src\minion\profiles\alias.ps1
-# . $env:minion\profiles\alias.ps1
-# Add Minion go executable to path.
-# . $env:minion\profiles\path.ps1
-# Add Minion to path
-# Write-Host "+ Added minion command to path."
-# if($IsWindows){
-# $ENV:PATH+=";$env:minion\go" # Flag to ensure my profile kicked in.
-# }
-
-# Unix dies hard.
-New-Alias which get-command
-# New-Alias rm Remove-Item
+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
# Delay loading PoshGit for speed.
function Enable-PoshGit {
Import-Module posh-git
}
New-Alias pg Enable-PoshGit
-Write-Host "+ Type 'pg' to enable PoshGit"
-
-function Invoke-X16Emu {
- param(
- [string]$File
- )
- x16emu.exe -bas $File -keymap en-us
-}
-
-New-Alias x16 Invoke-X16Emu
-
-if((Get-Location).Path -eq $HOME){
- cd $env:src
-}
-
-function Get-GitLog() {
- git log --oneline
-}
-function Get-GitStatus() {
- git status -b --short
-}
-
-# Tell my scripts which GitHub repositories to look in.
-$env:GITHUB_USERNAME = 'edthedev'
-$env:GITHUB_REPOS = @(
- 'techservicesillinois/SecOps-Tools',
- 'techservicesillinois/secdev-job-aids',
- 'techservicesillinois/awscli-login',
- 'techservicesillinois/farmit',
- 'uillinois-community/uillinois-community.github.io',
- 'techservicesillinois/SecOps-Powershell-CSOC',
- 'techservicesillinois/SecOps-Powershell-CISDSC',
- 'techservicesillinois/secops-splunk-null-router'
-) -join ' '
-$ENV:TS_REPOS = $ENV:GITHUB_REPOS.split(' ') | Where { $_ -like 'techser*' }
-
-
-# Nice for git
-New-Alias ol Get-GitLog
-New-Alias st Get-GitStatus
-
-# Dashboard
-New-Alias dash Show-MyDashboard # from dash.psm1
+Set-Alias code codium # Prefer Codium
-function Get-JournalAgenda() {
- agenda.exe -path "$HOME/Journal/{YYYY}/{MM}-{DD}.md"
-}
-New-Alias today Get-JournalAgenda
+# You can pry my unix commands out of my cold dead fingers
+Set-Alias which get-command
+# Reject Windows heritage, act like Vi
+Set-PSReadlineOption -HistorySavePath $env:src\PSHistory.log
+Set-PSReadlineOption -BellStyle Visual
+Set-PSReadlineOption -ViModeIndicator Prompt
+Set-PSReadlineOption -EditMode Vi
-function Invoke-FixWslVPN {
- Get-NetAdapter | Where-Object {$_.InterfaceDescription -Match "Cisco AnyConnect Secure Mobility Client Virtual Miniport Adapter for Windows x64"} | Set-NetIPInterface -InterfaceMetric 6000
-}
+Write-Host "+ Type 'pg' to enable PoshGit"
+Write-Host 'See $env:realProfile for version controlled profile file.'
+# Let's face it, I'm about to cd into my source directory
+if((Get-Location).Path -eq $HOME){ cd $env:src }
\ No newline at end of file
</div>
*/
-body {
- color: white;
- background-color: #1e3877;
-}
code {
color: white;
}
background-color: rgba(0, 122, 204, 0.5);
}
a {
- color: #9ab6d9;
outline-style: dashed;
outline-width: medium;
padding: 1em;
.right {
float:right;
}
+
+
+/* Dark Theme */
+:root {
+ /* Backgrounds */
+ --main-bg-color: #181818;
+ --code-bg-color: #222222;
+
+ /* Foregrounds */
+ --main-text-color: #bbbbbb;
+ --link-text-color: #22A7F0;
+ --visited-link-color: #7462E0;
+}
+
+body
+{
+ /* font-family: 'times new roman', times, serif; */
+ font-family: monospace;
+ font-size:2vw;
+ color: var(--main-text-color);
+ background-color: var(--main-bg-color) !important;
+ margin: 0em;
+}
+
+a {
+ color: var(--link-text-color);
+}
+a:visited {
+ color: var(--visited-link-color);
+}
\ No newline at end of file
--- /dev/null
+# Dashboard
+New-Alias dash Show-MyDashboard # from dash.psm1
+
+function Get-JournalAgenda() {
+ agenda.exe -path "$HOME/Journal/{YYYY}/{MM}-{DD}.md"
+}
+New-Alias today Get-JournalAgenda
\ No newline at end of file
--- /dev/null
+$env:Journal = "~\Journal" # allows cd $env:journal
+$env:todolist = "C:\Users\delaport\Journal\"
+# Tell my scripts which GitHub repositories to look in.
+$env:GITHUB_USERNAME = 'edthedev'
+$env:GITHUB_REPOS = @(
+ 'techservicesillinois/SecOps-Tools',
+ 'techservicesillinois/secdev-job-aids',
+ 'techservicesillinois/awscli-login',
+ 'techservicesillinois/farmit',
+ 'uillinois-community/uillinois-community.github.io',
+ 'techservicesillinois/SecOps-Powershell-CSOC',
+ 'techservicesillinois/SecOps-Powershell-CISDSC',
+ 'techservicesillinois/secops-splunk-null-router'
+) -join ' '
+$ENV:TS_REPOS = $ENV:GITHUB_REPOS.split(' ') | Where { $_ -like 'techser*' }
+
--- /dev/null
+// Place your key bindings in this file to override the defaultsauto[]
+[
+ {
+ "key": "shift+alt+8",
+ "command": "workbench.action.moveEditorToFirstGroup"
+ },
+ {
+ "key": "shift+alt+1",
+ "command": "-workbench.action.moveEditorToFirstGroup"
+ },
+ {
+ "key": "shift+alt+1",
+ "command": "journal.note"
+ },
+ {
+ "key": "alt+home",
+ "command": "journal.today"
+ },
+ {
+ "key": "shift+alt+3",
+ "command": "workbench.view.search.focus"
+ },
+ {
+ "key": "shift+alt+v",
+ "command": "workbench.view.scm",
+ "when": "workbench.scm.active"
+ },
+ {
+ "key": "ctrl+shift+g",
+ "command": "-workbench.view.scm",
+ "when": "workbench.scm.active"
+ },
+ {
+ "key": "shift+alt+6",
+ "command": "workbench.action.toggleSidebarVisibility"
+ },
+ {
+ "key": "ctrl+b",
+ "command": "-workbench.action.toggleSidebarVisibility"
+ },
+ {
+ "key": "shift+alt+5",
+ "command": "workbench.action.toggleMaximizedPanel"
+ },
+ {
+ "key": "shift+alt+4",
+ "command": "workbench.action.terminal.toggleTerminal",
+ "when": "terminal.active"
+ },
+ {
+ "key": "ctrl+`",
+ "command": "-workbench.action.terminal.toggleTerminal",
+ "when": "terminal.active"
+ },
+ {
+ "key": "alt+right",
+ "command": "journal.tomorrow"
+ },
+ {
+ "key": "alt+left",
+ "command": "journal.yesterday"
+ },
+ {
+ "key": "shift+alt+2",
+ "command": "workbench.action.toggleZenMode"
+ },
+ {
+ "key": "ctrl+k z",
+ "command": "-workbench.action.toggleZenMode"
+ }
+]
\ No newline at end of file
--- /dev/null
+
+$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
--- /dev/null
+function Add-ToPath {
+ param (
+ $Path,
+ [switch]$Optional=$false
+ )
+ if(Test-Path $Path){
+ $ENV:PATH+=";$PATH"
+ } else {
+ if(-Not $Optional) {
+ Write-Error "Add-ToPath failed for $PATH"
+ }
+ }
+}
+
+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\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:\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
+ Add-ToPath "$env:src\bin" -optional # anything else I need
+}
+else {
+ Add-ToPath "$env:src/bin" -optional # anything else I need
+ Add-ToPath "$HOME/x16/x16-emulator" -optional # x16 Emulator
+ Add-ToPath "$HOME/src/x16-demo/tools" -optional # x16 python tools
+}
+
+# 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
--- /dev/null
+winget install vscodium
\ No newline at end of file
--- /dev/null
+
+# Set-Alias renumber $HOME/src/x16-demo/
+function Invoke-X16Emu {
+ param(
+ [string]$File
+ )
+ x16emu.exe -bas $File -keymap en-us
+}
+
+New-Alias x16 Invoke-X16Emu
\ No newline at end of file
--- /dev/null
+function Add-ToProfile {
+ param (
+ $Path
+ )
+ $profileContents = [string]::join([environment]::newline, (get-content -path $Path))
+ invoke-expression $profileContents
+}
+Export-ModuleMember -Function Add-ToProfile
\ No newline at end of file
Get-Job -Name "FileCollection" | Remove-Job
}
-Export-ModuleMember -Function Show-Drivespace
+Export-ModuleMember -Function Show-DriveSpace
Export-ModuleMember -Function Show-LargeFiles
--- /dev/null
+function Invoke-FixWslVPN {
+ Get-NetAdapter | Where-Object {$_.InterfaceDescription -Match "Cisco AnyConnect Secure Mobility Client Virtual Miniport Adapter for Windows x64"} | Set-NetIPInterface -InterfaceMetric 6000
+}
+Export-ModuleMember -Function Invoke-FixWslVPN
\ No newline at end of file
--- /dev/null
+function Get-GitLog() {
+ git log --oneline
+}
+
+function Get-GitStatus() {
+ git status -b --short
+}
--- /dev/null
+codium --install-extension ban.spellright
+codium --install-extension bierner.markdown-mermaid
+codium --install-extension brunnerh.insert-unicodium
+codium --install-extension ms-vscodium-remote.remote-containers
+codium --install-extension ms-vscodium-remote.remote-ssh
+codium --install-extension ms-vscodium-remote.remote-ssh-edit
+codium --install-extension ms-vscodium-remote.remote-wsl
+codium --install-extension ms-vscodium-remote.vscodium-remote-extensionpack
+codium --install-extension ms-vscodium.remote-explorer
+codium --install-extension ms-vscodium.remote-server
+codium --install-extension pajoma.vscodium-journal
+codium --install-extension rioj7.vscodium-json-validate
+codium --install-extension tomasr8.close-all-but-this
+codium --install-extension vscodiumvim.vim
+codium --install-extension yzane.markdown-pdf
+codium --install-extension yzhang.markdown-all-in-one
+codium --install-extension ZainChen.json
\ No newline at end of file