From c152c6b5a9a45be3b6a7c72fb4142662edd669a2 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Wed, 24 May 2023 06:41:01 +0200 Subject: Added tags --- content/notes/catv-weechat-config.md | 1 + content/notes/convert-mkv.md | 1 + content/notes/download-youtube-videos.md | 1 + content/notes/fix-plan9-bootloader.md | 1 + content/notes/git-push-multiple-origins.md | 1 + content/notes/install-plan9port-linux.md | 1 + content/notes/mass-set-permission.md | 1 + content/notes/mount-plan9-over-network.md | 1 + content/notes/non-blocking-shell-exec-csharp.md | 43 +++++++++++++++++++++++++ content/notes/plan9-screenshot.md | 1 + content/notes/preview-troff-man-pages.md | 1 + content/notes/run-9front-in-qemu.md | 1 + content/notes/write-iso-usb.md | 1 + 13 files changed, 55 insertions(+) create mode 100644 content/notes/non-blocking-shell-exec-csharp.md (limited to 'content') diff --git a/content/notes/catv-weechat-config.md b/content/notes/catv-weechat-config.md index 8d85d22..3e6e612 100644 --- a/content/notes/catv-weechat-config.md +++ b/content/notes/catv-weechat-config.md @@ -4,6 +4,7 @@ url: catv-weechat-config.html date: 2023-05-09 type: notes draft: false +tags: [irc, weechat, cat-v] --- Set up weechat to connect to #cat-v on oftc. This applies to [weechat](https://weechat.org/) diff --git a/content/notes/convert-mkv.md b/content/notes/convert-mkv.md index cca08d7..bafdfb3 100644 --- a/content/notes/convert-mkv.md +++ b/content/notes/convert-mkv.md @@ -4,6 +4,7 @@ url: convert-mkv.html date: 2023-05-14 type: notes draft: false +tags: [ffmpeg, mkv, webm, mp4] --- You will need `ffmpeg` installed on your system. This will convert all MKV files diff --git a/content/notes/download-youtube-videos.md b/content/notes/download-youtube-videos.md index dd3363d..455c550 100644 --- a/content/notes/download-youtube-videos.md +++ b/content/notes/download-youtube-videos.md @@ -4,6 +4,7 @@ url: download-youtube-videos.html date: 2023-05-13 type: notes draft: false +tags: [youtube, yt-dlp, ffmpeg, webm, mp4] --- If you need to download a list of YouTube videos and don't want to download the diff --git a/content/notes/fix-plan9-bootloader.md b/content/notes/fix-plan9-bootloader.md index f37ff0e..675eabc 100644 --- a/content/notes/fix-plan9-bootloader.md +++ b/content/notes/fix-plan9-bootloader.md @@ -4,6 +4,7 @@ url: fix-plan9-bootloader.html date: 2023-05-11 type: notes draft: false +tags: [plan9, bootloader] --- If the bootloader is not being written to a disk when installing 9front on real diff --git a/content/notes/git-push-multiple-origins.md b/content/notes/git-push-multiple-origins.md index 228f857..14b6ed0 100644 --- a/content/notes/git-push-multiple-origins.md +++ b/content/notes/git-push-multiple-origins.md @@ -4,6 +4,7 @@ url: git-push-multiple-origins.html date: 2023-05-06 type: notes draft: false +tags: [git] --- Sometimes you want to push to multiple origins at once. This is useful if you diff --git a/content/notes/install-plan9port-linux.md b/content/notes/install-plan9port-linux.md index 6355287..7e8994d 100644 --- a/content/notes/install-plan9port-linux.md +++ b/content/notes/install-plan9port-linux.md @@ -4,6 +4,7 @@ url: install-plan9port-linux.html date: 2023-05-12 type: notes draft: false +tags: [plan9, plan9port, linux] --- Install Plan9port on Linux. This applies to [Plan9port](https://9fans.github.io/plan9port/). diff --git a/content/notes/mass-set-permission.md b/content/notes/mass-set-permission.md index 20a4fab..84ec97a 100644 --- a/content/notes/mass-set-permission.md +++ b/content/notes/mass-set-permission.md @@ -4,6 +4,7 @@ url: mass-set-permission.html date: 2023-05-16 type: notes draft: false +tags: [linux, find, chmod] --- Replace `*.xml` with your pattern. This will remove executable bit from all diff --git a/content/notes/mount-plan9-over-network.md b/content/notes/mount-plan9-over-network.md index 3572b99..9e9875e 100644 --- a/content/notes/mount-plan9-over-network.md +++ b/content/notes/mount-plan9-over-network.md @@ -4,6 +4,7 @@ url: mount-plan9-over-network.html date: 2023-05-07 type: notes draft: false +tags: [plan9, linux, 9pfs] --- - First install libfuse with sudo apt install libfuse-dev. diff --git a/content/notes/non-blocking-shell-exec-csharp.md b/content/notes/non-blocking-shell-exec-csharp.md new file mode 100644 index 0000000..4ac3904 --- /dev/null +++ b/content/notes/non-blocking-shell-exec-csharp.md @@ -0,0 +1,43 @@ +--- +title: Execute not blocking async shell command in C# +url: non-blocking-shell-exec-csharp.html +date: 2023-05-24 +type: notes +draft: false +tags: [csharp, async, shell] +--- + +Execute a shell command in async in C# while not blocking the UI thread. + +```c# +private async Task executeCopyCommand() +{ + await Task.Run(() => + { + var processStartInfo = new ProcessStartInfo("cmd", "/c dir") + { + RedirectStandardOutput = true, + UseShellExecute = false, + CreateNoWindow = true + }; + + var process = new Process + { + StartInfo = processStartInfo + }; + + process.Start(); + process.WaitForExit(); + }); +} +``` + +Make sure that `async` is present in the function definition and `await` is +used in the method that calls `executeCopyCommand()`. + +```c# +private async void button_Click(object sender, EventArgs e) +{ + await executeCopyCommand(); +} +``` diff --git a/content/notes/plan9-screenshot.md b/content/notes/plan9-screenshot.md index 88b7bd9..fe21ee4 100644 --- a/content/notes/plan9-screenshot.md +++ b/content/notes/plan9-screenshot.md @@ -4,6 +4,7 @@ url: plan9-screenshot.html date: 2023-05-10 type: notes draft: false +tags: [plan9, screenshot] --- Take a screenshot in Plan9. This applies to [Plan9](https://9p.io/plan9/) and diff --git a/content/notes/preview-troff-man-pages.md b/content/notes/preview-troff-man-pages.md index 6ff1124..acda0d6 100644 --- a/content/notes/preview-troff-man-pages.md +++ b/content/notes/preview-troff-man-pages.md @@ -4,6 +4,7 @@ url: preview-troff-man-pages.html date: 2023-05-15 type: notes draft: false +tags: [troff, man] --- Troff is used to write man pages and it is difficult to read it so this will diff --git a/content/notes/run-9front-in-qemu.md b/content/notes/run-9front-in-qemu.md index 1e6820d..0001162 100644 --- a/content/notes/run-9front-in-qemu.md +++ b/content/notes/run-9front-in-qemu.md @@ -4,6 +4,7 @@ url: run-9front-in-qemu.html date: 2023-05-05 type: notes draft: false +tags: [plan9, qemu] --- Run 9front in Qemu. This applies to [Plan9](https://9p.io/plan9/) and diff --git a/content/notes/write-iso-usb.md b/content/notes/write-iso-usb.md index 04b0c81..860e6a7 100644 --- a/content/notes/write-iso-usb.md +++ b/content/notes/write-iso-usb.md @@ -4,6 +4,7 @@ url: write-iso-usb.html date: 2023-05-08 type: notes draft: false +tags: [linux, iso, usb] --- Write ISO to USB key. Nothing fancy here. -- cgit v1.2.3