View windows-explorer-open-with-code.reg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
; Open files | |
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code] | |
@="Edit with VS Code" | |
"Icon"="C:\\Program Files\\Microsoft VS Code\\Code.exe,0" | |
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code\command] | |
@="\"C:\\Program Files\\Microsoft VS Code\\Code.exe\" \"%1\"" | |
; This will make it appear when you right click ON a folder | |
; The "Icon" line can be removed if you don't want the icon to appear | |
[HKEY_CLASSES_ROOT\Directory\shell\vscode] |
View get_head_commit_message.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#runs-on: windows-latest | |
# steps: | |
# - uses: actions/checkout@v3.5.2 # https://github.com/marketplace/actions/checkout | |
- name: Get Head Commit Message | |
id: get_head_commit | |
shell: pwsh | |
run: | | |
$Message = git log --format=%B -n 1 HEAD | |
Write-Output "title=$($Message | Select -First 1)" >> $Env:GITHUB_OUTPUT | |
Write-Output "body=$($Message | Select -Skip 1)" >> $Env:GITHUB_OUTPUT |
View broken-wsl.cmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lxrun /uninstall /full` | |
lxrun /install` |
View wpf-page-in-frame.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Frame> | |
<Frame.Content> | |
<Page/> | |
</Frame.Content> | |
</Frame> |
View wpf-system-net-sockets-error.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<PropertyGroup> | |
<RestoreProjectStyle>PackageReference</RestoreProjectStyle> | |
</PropertyGroup> |
View removing-characters-forbidden-in-windows-filenames.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Regex illegalInFileName = new Regex(@"[\\/:*?""<>|]"); | |
string myString = illegalInFileName.Replace(myString, ""); |
View mynaturewatchcamera-download-all.bat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scp –r pi@mynaturewatchcamera:/home/pi/NaturewatchCameraServer/naturewatch_camera_server/static/data ~/Desktop/data |
View PowerShellInvoke.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string directory = ""; // directory of the git repository | |
using (PowerShell powershell = PowerShell.Create()) { | |
// this changes from the user folder that PowerShell starts up with to your git repository | |
powershell.AddScript($"cd {directory}"); | |
powershell.AddScript(@"git init"); | |
powershell.AddScript(@"git add *"); | |
powershell.AddScript(@"git commit -m 'git commit from PowerShell in C#'"); | |
powershell.AddScript(@"git push"); |
View App.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Application x:Class="WpfTrayIcon.App" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
ShutdownMode="OnExplicitShutdown" | |
> | |
<Application.Resources> | |
</Application.Resources> | |
</Application> |
NewerOlder