Skip to content

Instantly share code, notes, and snippets.

@cuckon
cuckon / profile.ps1
Created March 17, 2025 10:04
Pretty Powershell Prompt
# Put it to $PROFILE
function prompt {
$path = Get-Location
$parts = $path.Path -split '\\'
# Extract drive letter and first folder
$drive = $parts[0]
$topFolder = if ($parts.Count -gt 1) { $parts[1] } else { "" }
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
choco install -y git.install python vscode docker-cli docker-compose powertoys cascadiacode microsoft-windows-terminal
python -m pip install ptpython
# 清华源
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
# 或:
# 阿里源
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
# 腾讯源
pip config set global.index-url http://mirrors.cloud.tencent.com/pypi/simple
# 豆瓣源
pip config set global.index-url http://pypi.douban.com/simple/
@cuckon
cuckon / settings.yml
Last active January 25, 2021 09:02
My VS Code Configuration
{
"editor.rulers": [80, 120],
"files.autoSave": "onFocusChange",
"files.exclude": {
"**/*.idea": true,
"**/*.pyc": true,
".vscode": true
},
"files.trimTrailingWhitespace": true,
"workbench.activityBar.visible": true,