IT漫步

技术生活札记©Yaohui

博客

Collecting User-Mode Dumps for Windows Applications

By the sytem: https://learn.microsoft.com/zh-cn/windows/win32/wer/collecting-user-mode-dumps REG ADD “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps” /v DumpType /t REG_DWORD /d 2 /f REG ADD “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps” /v DumpCount /t REG_DWORD /d 3 /f REG ADD “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps” /v DumpFolder /t REG_EXPAND_SZ /d C:\app\CrashDumps /f By programmatical: https://stackoverflow.com/questions/1547211/how-to-create-minidump-for-my-process-when-it-crashes#1547251

0 comments

Install Docker EE on Windows Server by Powershell

Enable-WindowsOptionalFeature -Online -FeatureName containers –All Install-Module -Name DockerMsftProvider -Repository PSGallery –Force Install-Package -Name docker -ProviderName DockerMsftProvider –verbose

0 comments

Suppress console output in PowerShell/Batch

Powershell When exception is occured, Out-Null is actually not worked, so uses Get-ChildItem aaa >$null 2>&1 Or in Powershell 3 Get-ChildItem aaa *>$null Batch/Dos dir aaa >nul 2>&1

0 comments

Gitlab pages throws 502

Intermittent 502 errors or after a few days If you run Pages on a system that uses systemd and tmpfiles.d, you may encounter intermittent 502 errors trying to serve Pages with an error similar to: dial tcp: lookup gitlab.example.com on [::1]:53: dial udp [::1]:53: connect: no route to host” GitLab Pages creates a bind mount …

0 comments

Powershell: Copy-Item doesn’t work when file name contains square bracket ([]) characters

I have a file whose name contains square bracket characters, and I want to copy the file to another location via Powershell. So I use the Copy-Item founcation to do this. like this: Copy-Item -Path “C:\FileTest\1\[Control]Test.txt” -Destination “C:\FileTest\2\[Control]Update.txt” No errors occurred when executing the script, but the target file was not copied either. After looking …

0 comments

Follow the official document to install docker on debian/jessie meets an error

Update the apt package index and install packages to allow apt to use repository over HTTPS: apt-get update apt-get install \ ca-certificates \ curl \ gnupg \ lsb-release Add Docker’s official GPG key: curl -fsSL https://download.docker.com/linux/debian/gpg | gpg –dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg Use the following command to set up the stable repository echo \ “deb [arch=$(dpkg …

0 comments

Powershell does not support pass Boolean parameter when -File parameter is used

Let’s say there is a Powershell script file named test.ps1 with the following content: param ([Boolean] $FromSchTask) if ($FromSchTask) { echo Yes } else { echo No } When I run this script with -File parameter in command prompt by powershell.exe, for example: C:\>powershell.exe -ExecutionPolicy bypass -File ./test.ps1 -FromSchTask $True It will throw the following …

0 comments

iBus not working on Ubuntu 20.04.4 LTS, 无法在Ubuntu中输入中文

问题现象 Ubuntu 20.04.4 LTS 添加汉语语言 安装完iBus及相关的输入法 (ibus-pinyin, ibus-table-wubi)后,就算是切换到zh语言也无法输入中文字符 换成fcitx后解决: 安装fcitx: $ sudo apt install fcitx 打开工具 Language Support/语言支持, 把Keyboard input method system改成fcitx 安装五笔输入法 $ sudo apt install fcitx-table-wubi 按Ctrl + Space或Left Shift在中英文之间切换 按Ctrl + Shift在不同的中文输入法之间切换

0 comments

USB specifications and aliases of USB3

Specification Previous Term Technical Term Marketing Term USB 3.2 N/A USB 3.2 Gen 2×2 SuperSpeed USB 20Gbps USB 3.1 USB 3.1 Gen 2 USB 3.2 Gen 2 SuperSpeed USB 10Gbps USB 3.0 USB 3.1 Gen 1 USB 3.2 Gen 1 SuperSpeed USB References: Forget USB 3.0 & USB 3.1: USB 3.2 Moving Forward USB 4.0:支援 …

0 comments

Aliyun SLS 日志加工高级参数

1. system.control.filter_pack_id 控制数据加工后是否过滤掉pack_id字段, 该字段用于日志条目的上下文查询 – 默认值: true – 如果日志加工后想保留pack_id字段, 把该字段设置为false

0 comments
Proudly powered by WordPress