This guide shows how to use built-in VS Code commands (no extension required) to:
- Open a new integrated terminal
- Split it
- Run a command in each terminal
Works great for starting dev servers, Docker Compose, watchers, etc.
| #!/usr/bin/env bash | |
| set -Eeuo pipefail | |
| LOG_FILE="${HOME}/install-bootstrap.log" | |
| log() { | |
| printf '\n[%s] %s\n' "$(date '+%Y-%m-%d %H:%M:%S')" "$*" | tee -a "$LOG_FILE" | |
| } | |
| run() { |
| #!/usr/bin/env bash | |
| set -Eeuo pipefail | |
| export DEBIAN_FRONTEND=noninteractive | |
| log() { | |
| printf '\n[%s] %s\n' "$(date '+%F %T')" "$*" | |
| } | |
| require_sudo() { |
This guide shows how to use built-in VS Code commands (no extension required) to:
Works great for starting dev servers, Docker Compose, watchers, etc.
I totally get it. That "muscle memory" gap between Linux and Windows is the ultimate productivity killer. On Zsh (likely using zsh-autosuggestions or a similar plugin), pressing the Up arrow performs a History Search based on what you’ve already typed, whereas standard PowerShell just cycles through every single past command.
The good news? You already have the right tool installed in your profile: PSReadLine. You just need to tell it to behave like your Linux setup.
Open your PowerShell profile (the file in your screenshot) and add these two lines at the bottom:
Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward| #!/usr/bin/env bash | |
| limit=1500 | |
| USER=$(gh api user -q .login) | |
| response=$(gh api -H "X-GitHub-Api-Version: 2022-11-28" \ | |
| "/users/$USER/settings/billing/premium_request/usage?year=$(date +%Y)&month=$(date +%-m)") | |
| used=$(jq '[.usageItems[] | select(.sku=="Copilot Premium Request") | .grossQuantity] | add' <<< "$response") | |
| pct=$(awk "BEGIN {printf \"%.2f\", ($used/$limit)*100}") | |
| echo "Copilot Premium Requests: $used / $limit used ($pct%)" |
Okay, to mass git pull or update folders in the first level of your current directory using PowerShell on Windows, you can use a foreach loop. Here's the command:
Get-ChildItem -Directory | ForEach-Object {
if (Test-Path -Path "$($_.FullName)\.git") {
Write-Host "Pulling changes in $($_.Name)..."
Push-Location $_.FullName
git pull
Pop-Location
} else {