Skip to content

Instantly share code, notes, and snippets.

View timsu92's full-sized avatar

timsu92

  • NCCUCS
  • 14:39 (UTC +08:00)
View GitHub Profile
@timsu92
timsu92 / umnt.sh
Created December 21, 2023 02:59
手動從WSL退出磁碟區
#!/bin/bash
# 檢查是否有參數並處理 --help 選項
if [ $# -ne 1 ]; then
echo "參數數量不正確,請使用 --help 參數獲得說明。"
exit 1
elif [ "$1" == "--help" ]; then
echo "使用說明: $0 <drive_letter>"
echo " <drive_letter>: 單個字母參數 (a 到 z 或 A 到 Z)"
exit 0
@timsu92
timsu92 / mnt.sh
Created December 21, 2023 02:58
手動掛載磁碟區進WSL
#!/bin/bash
# 檢查是否有參數並處理 --help 選項
if [ $# -ne 1 ]; then
echo "參數數量不正確,請使用 --help 參數獲得說明。"
exit 1
elif [ "$1" == "--help" ]; then
echo "使用說明: $0 <drive_letter>"
echo " <drive_letter>: 單個字母參數 (a 到 z 或 A 到 Z)"
exit 0
@timsu92
timsu92 / clean.bash
Last active December 21, 2023 02:53
Cache cleaner
#!/usr/bin/env bash
echo "=============Poetry=============="
if command -v poetry > /dev/null; then
# 其他的可以看~/.cache/pypoetry/cache
poetry cache clear PyPI --all
poetry cache clear _default_cache --all
echo "Poetry's cache cleaned"
fi