Merge remote-tracking branch 'refs/remotes/origin/master'

This commit is contained in:
js0ny 2024-11-25 21:14:34 +00:00
commit 74f2883139
5 changed files with 38 additions and 26 deletions

View file

@ -18,3 +18,5 @@
smudge = git-lfs smudge -- %f smudge = git-lfs smudge -- %f
process = git-lfs filter-process process = git-lfs filter-process
required = true required = true
[safe]
directory = %(prefix)///wsl.localhost/Arch/home/js0ny/inf2c/coursework-2-mips-simulator-js0ny

View file

@ -35,3 +35,12 @@ ${function:pydact} = { conda deactivate }
${function:pylsenvs} = { conda env list } ${function:pylsenvs} = { conda env list }
${function:pymkenv} = { conda create --name $args[0] } ${function:pymkenv} = { conda create --name $args[0] }
${function:pyrmenv} = { conda remove --name $args[0] --all } ${function:pyrmenv} = { conda remove --name $args[0] --all }
# Winget #
if ($isWindows) {
${function:wini} = { winget install $args }
${function:winr} = { winget uninstall $args }
${function:wins} = { winget search $args }
${function:winu} = { winget upgrade $args }
}

View file

@ -175,6 +175,7 @@ scoop install main/dos2unix # Convert line endings
scoop install main/hyperfine # Benchmark scoop install main/hyperfine # Benchmark
scoop install main/bottom # System Monitor scoop install main/bottom # System Monitor
scoop install main/delta # diff scoop install main/delta # diff
scoop install extras/gpg4win
# File Management # File Management
scoop install extras/everything scoop install extras/everything

View file

@ -1,10 +1,10 @@
# ~/.wslconfig # ~/.wslconfig
# New-Item -ItemType SymbolicLink -Path ~\.wslconfig -Target ~\.dotfiles\win\.wslconfig # New-Item -ItemType SymbolicLink -Path ~\.wslconfig -Target ~\.dotfiles\win\.wslconfig
[wsl2] [wsl2]
networkingMode=mirrored # networkingMode=mirrored
dnsTunneling=true # dnsTunneling=true
firewall=true # firewall=true
autoProxy=true # autoProxy=true
[experimental] [experimental]
# requires dnsTunneling but are also OPTIONAL # requires dnsTunneling but are also OPTIONAL

View file

@ -79,24 +79,24 @@ If (Test-Path "$HOME\miniconda3\Scripts\conda.exe") {
#endregion #endregion
## Check Start Up ## ## Check Start Up ##
$SystemlogFilePath = "$env:USERPROFILE\.PowerShellStartup.log" #$SystemlogFilePath = "$env:USERPROFILE\.PowerShellStartup.log"
# 检查日志文件是否存在 ## 检查日志文件是否存在
if (-not (Test-Path $SystemlogFilePath)) { #if (-not (Test-Path $SystemlogFilePath)) {
New-Item -Path $SystemlogFilePath -ItemType File -Force | Out-Null # New-Item -Path $SystemlogFilePath -ItemType File -Force | Out-Null
} #}
# 读取日志文件的最后一行(即上次启动日期) ## 读取日志文件的最后一行(即上次启动日期)
$__lastStartup = Get-Content -Path $SystemlogFilePath -Tail 1 -ErrorAction SilentlyContinue #$__lastStartup = Get-Content -Path $SystemlogFilePath -Tail 1 -ErrorAction SilentlyContinue
$_currentDate = (Get-Date).ToString("yyyy-MM-dd") #$_currentDate = (Get-Date).ToString("yyyy-MM-dd")
if (-not ($__lastStartup -eq $_currentDate)) { #if (-not ($__lastStartup -eq $_currentDate)) {
Get-Date # Get-Date
Update-ForexData & # Update-ForexData &
Write-Host "今天是第一次启动 PowerShell。" # Write-Host "今天是第一次启动 PowerShell。"
# 记录当前日期到日志文件 # # 记录当前日期到日志文件
$_currentDate | Out-File -FilePath $SystemlogFilePath -Append # $_currentDate | Out-File -FilePath $SystemlogFilePath -Append
} #}
Remove-Variable SystemlogFilePath #Remove-Variable SystemlogFilePath
Remove-Variable __lastStartup #Remove-Variable __lastStartup
Remove-Variable _currentDate #Remove-Variable _currentDate
# Use some unix commands # Use some unix commands
${function:tree} = { wsl tree $args} ${function:tree} = { wsl tree $args}