--- tags: 常用 --- # APPLE快捷 ## 鍵盤快捷鍵 | | | | -------- | -------- | |control|command| |alt|option| |ctrl c|command c| |ctrl y下一步|command + shift + z| | 強制關閉程式 | option + command + esc | |終止程式| commad + Q| |command + option + esc|強制結束選單| |快速移動游標| option + ↑↓←→| |視窗縮到右側| command + H| |視窗縮到底下| command + M| |視窗切換| dcommand + tab| |預覽內容| 按空白鍵| |檔案移動| command + option + V| |倒著刪除| fn + delete| |檔案刪除| command + delete| |翻譯| ctrl + command + D| |表情符號| ctrl + command + 空白鍵| |整面截圖|shift + command + 3| |部分截圖|shift + command + 4| |螢幕錄影|shift + command + 5| |搜尋|command + 空白鍵| |打開隱藏的文件|command + shift + .| |新增標籤|command + T| |新增視窗頁|command + N| |移到右側標籤頁|control⌃ + tab⇥| |移到右側標籤頁|control⌃ + tab⇥ + shift| |特殊符號|control⌃ +command⌘ + 空白| ## Terminal | | | |-|-| **往上跳**|command + 上下(再加上shift可以選取指令範圍) **看歷史指令不印出行號** | history \| awk '{$1=""; print substr($0,2)}' **顯示隱藏檔案** | shift + command + . **cd** | 到指定資料夾 **pwd** | 看目前路徑 **~** | 等同 /Users/使用者名子(家目錄) **ls** | 列出當前資料夾所有檔案 **cd . .** | 返回上一個資料夾 **tab** | 自動補齊單字 **上下方向鍵** | 最近執行指令 **複製貼上** | command + c/v **mkdir 資料夾** | 新增資料夾 **rmdir 資料夾** | 刪除資料夾 **mddir {1..10}** | 新增1到10的資料夾 **rmdir {1..10}** | 刪除1到10的資料夾 **mddir {1..10}/{a..z}** | 在1到10的資料夾內新增a~z的資料夾 **rm** | 刪除檔案要非常小心 因為沒有垃圾桶 **rm -r 或rm -rf** | 強制刪除有很多資料的資的資料夾 **sudo** | 管理員進行 sudo rm 要用的非常小心 **cal 月份 年** | 看當月日 月份跟年不一定要打 **clear** | 清空畫面 **touch filename** | 創建資料夾 **echo "text" > filename** | 輸入text到file裡 如果file不存在就創建file **vim filename** | 用vim開啟或創建資料夾 **nano filename** | 用nano開啟或創建資料夾 **export PATH=bin的檔案路徑:$PATH** | 在cmd中導入路徑 **source ~/.zshrc** | 執行zshrc檔案(裡面放命令列指令 是預設開啟檔)或是bashrc或bash_profile。source是讀取檔案並執行命令(Read and execute commands from FILENAME **sorce**|在mac中應用像是windows中的bat檔 **freeze**|pip freeze > requirements.txt # 输出本地包环境至文件 **which pip 或 which pip3** | 查看pip的位置 **which python 或 which python3** | 查看python的位置 **python -m site --user-site** | 看site package的位置 參考資料 https://yakimhsu.com/project/project_w1_CommandLine.html https://youtu.be/K2EPvu9UJF0 ## 全形英文 按著 Shift 不放、打字,就可以打出全形英文大寫 按住 Option 不放、打字,就可以打出全形英文小寫 ## xcode 增加 bits/stdc++.h 打开 Finder – 應用程序 – Xcode – 右擊 – 顯示包内容 路徑Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ 新增bits資料夾,在bits新增[stdc++.h](https://github.com/tekfyl/bits-stdc-.h-for-mac/blob/master/stdc%2B%2B.h) ## 虛擬環境建立 https://ithelp.ithome.com.tw/articles/10199980 ``` pip install virtualenv 下載虛擬環境的生成器 ``` ### 建立 ``` virtualenv的:virtualenv --python=想要的python版本的位置 檔案名 ex: virtualenv --python=/opt/python-3.6/bin/python venv python的預設生成器:python3 -m venv venv ``` ### 使用 ``` source ./venv/bin/activate ``` ### 退出 ``` deactivate ``` ## windows 虛擬機 ## 關閉開啟sip ### 開啟 1. 讓 Mac 進入復原模式 2. 配備 M1晶片的 Mac:關機並啟動 Mac 後,持續按住電源按鈕,直到看到「啟動選項」,點選「選項」 3. 點選頂端「工具程式」>「終端機」 4. 輸入「csrutil disable」後按 Enter 5. 若在下一行有出現「y/N」請輸入「y」並按 Enter,接著輸入你的 Mac 使用者密碼 6. 重新啟動 Mac ### 關閉 1. 讓 Mac 進入復原模式 2. 配備 M1晶片的 Mac:關機並啟動 Mac 後,持續按住電源按鈕,直到看到「啟動選項」,點選「選項」 3. 點選頂端「工具程式」>「終端機」 4. 輸入「csrutil enable」後按 Enter 5. 若在下一行有出現「y/N」請輸入「y」並按 Enter,接著輸入你的 Mac 使用者密碼 6. 重新啟動 Mac ### 查詢 1. 點選 Mac 選單列左上角「關於這台 Mac」 2. 點選「系統報告」 3. 將左側切換到「軟體」,然後我們就能在系統軟體概覽內查看「系統完整保護」狀態是已啟用或以關閉。 # ipad 輸入法切換 control + 空白 要記得關掉大寫鎖定鍵 不然打英文會一直跳來跳去 
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up