macOS 桌面不能操作、无文件 解决办法 作者: Chuwen 时间: 2021-05-13 分类: macOS 评论 执行以下命令即可: ```shell defaults write com.apple.finder CreateDesktop true;killall Finder ```
【使用 HoRNDIS】Android 手机通过 USB 网络共享给 macOS 上网 作者: Chuwen 时间: 2020-12-04 分类: macOS 评论 # 安装一个驱动 HoRNDIS 即可 > GitHub:https://github.com/jwise/HoRNDIS/releases > GitHub Release:https://github.com/jwise/HoRNDIS/releases > > 本人使用的(**蓝奏云网盘链接**):[HoRNDIS-9.2-catalina_install.pkg.zip][1] 按照提示安装,安装完成后,**重启系统**即可。 然后手机打开 **设置** -> **个人热点与网络共享** -> **USB 网络共享** ![MIUI 12 个人热点 截图][2] ### 一切顺利的话,会在你 macOS -> 系统设置 -> 网络 自动新增一个接口 ![一切顺利的话,会在你 macOS -> 系统设置 -> 网络 自动新增一个接口][3] # 发现的缺点 当你手机关闭 USB 网络共享/拔除 USB 线缆(数据线),再插入,打开 USB 网络共享,又会自动新增一个接口 如果你观察仔细的话,你可以看到有 `...(en3)`、`...(en4)` 这两个接口。没错,`...(en4)` 是我之前开启 USB网络共享 自动新增的,但现在我重新开启,又新增了 # Catalina 10.15.7 (19H15) 测试安装能够正常使用 ![Catalina 10.15.7 (19H15) ][4] --- 想查询更为详细?的内容,请访问:https://cloud-atlas.readthedocs.io/zh_CN/latest/android/hack/android_usb_tethering.html [1]: https://nowtime.lanzous.com/i1xLAj1r4ij [2]: https://cdn.nowtime.cc/2020/12/04/849199925.png [3]: https://cdn.nowtime.cc/2020/12/04/1599352426.jpg [4]: https://cdn.nowtime.cc/2020/12/04/1308725480.jpg
mac 下设置别名来用 ssh 连接 作者: Chuwen 时间: 2020-11-27 分类: macOS 评论 # 先创建文件夹/文件(如果没有的话) ``` mkdir ~/.ssh touch ~/.ssh/config ``` # 然后编辑文件 `vim ~/.ssh/config` ``` # 服务器1 Host 别名 HostName IP地址 Port 22 User 用户名 # 服务器2 Host 别名 HostName IP地址 Port 22 User 用户名 ``` # 连接 ``` ssh 别名 ```
macOS 使用 Homebrew 安装 Python 3 作者: Chuwen 时间: 2020-11-24 分类: macOS 评论 # 首先搜索可用 Python 版本 ```shell brew search python ``` > 啪的一下很快啊,搜到了: ```shell chuwen@Chuwen-MBP ~ % brew search python ==> Formulae app-engine-python micropython python@3.9 boost-python python-markdown reorder-python-imports boost-python3 python-yq wxpython gst-python python@3.7 ipython python@3.8 ==> Casks awips-python kk7ds-python-runtime mysql-connector-python If you meant "python" specifically: It was migrated from homebrew/cask to homebrew/core. ``` # 我这里需要安装 3.7 版本的,所以: ```shell brew install python@3.7 ``` # 安装完成,验证安装(查看版本号?) ```shell chuwen@Chuwen-MBP ~ % python3 --version Python 3.8.2 ```
【阿里云镜像】macOS 安装 composer 作者: Chuwen 时间: 2020-11-23 分类: macOS 评论 # 下载 > 由于在官网下载 `composer` 比较慢,所以我们可以使用 **阿里云 Composer 全量镜像** 下载 > 但我还是贴出 *官方下载&安装:`curl -sS getcomposer.org/installer | php`* ```shell # 下载 composer.phar curl https://mirrors.aliyun.com/composer/composer.phar -O composer.phar # 检查版本号 php composer.phar -v ``` # 如果需要全局使用 > 可以移动 `composer.phar` 到 `/usr/local/bin/` 路径下 ```shell sudo mv composer.phar /usr/local/bin/composer ``` ## 可能因为权限问题,直接执行 `composer` 会报权限不够 ```log chuwen@WenzhoudeMBP cms.iton.pw % composer -v zsh: permission denied: composer ``` ## 设置下权限即可 ```log sudo chomd -R 755 /usr/local/bin/composer ``` # 测试(输出版本号) > 记得往下,改 `阿里云 Composer 镜像源`,安装项目起飞?️ ```shel chuwen@WenzhoudeMBP cms.iton.pw % composer -v ______ / ____/___ ____ ___ ____ ____ ________ _____ / / / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/ / /___/ /_/ / / / / / / /_/ / /_/ (__ ) __/ / \____/\____/_/ /_/ /_/ .___/\____/____/\___/_/ /_/ Composer version 2.0.7 2020-11-13 17:31:06 Usage: command [options] [arguments] Options: -h, --help Display this help message -q, --quiet Do not output any message -V, --version Display this application version --ansi Force ANSI output --no-ansi Disable ANSI output -n, --no-interaction Do not ask any interactive question --profile Display timing and memory usage information --no-plugins Whether to disable plugins. -d, --working-dir=WORKING-DIR If specified, use the given directory as working directory. --no-cache Prevent use of the cache -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug Available commands: about Shows the short information about Composer. archive Creates an archive of this composer package. browse Opens the package's repository URL or homepage in your browser. cc Clears composer's internal package cache. check-platform-reqs Check that platform requirements are satisfied. clear-cache Clears composer's internal package cache. clearcache Clears composer's internal package cache. config Sets config options. create-project Creates new project from a package into given directory. depends Shows which packages cause the given package to be installed. diagnose Diagnoses the system to identify common errors. dump-autoload Dumps the autoloader. dumpautoload Dumps the autoloader. exec Executes a vendored binary/script. fund Discover how to help fund the maintenance of your dependencies. global Allows running commands in the global composer dir ($COMPOSER_HOME). help Displays help for a command home Opens the package's repository URL or homepage in your browser. i Installs the project dependencies from the composer.lock file if present, or falls back on the composer.json. info Shows information about packages. init Creates a basic composer.json file in current directory. install Installs the project dependencies from the composer.lock file if present, or falls back on the composer.json. licenses Shows information about licenses of dependencies. list Lists commands outdated Shows a list of installed packages that have updates available, including their latest version. prohibits Shows which packages prevent the given package from being installed. remove Removes a package from the require or require-dev. require Adds required packages to your composer.json and installs them. run Runs the scripts defined in composer.json. run-script Runs the scripts defined in composer.json. search Searches for packages. self-update Updates composer.phar to the latest version. selfupdate Updates composer.phar to the latest version. show Shows information about packages. status Shows a list of locally modified packages. suggests Shows package suggestions. u Upgrades your dependencies to the latest version according to composer.json, and updates the composer.lock file. update Upgrades your dependencies to the latest version according to composer.json, and updates the composer.lock file. upgrade Upgrades your dependencies to the latest version according to composer.json, and updates the composer.lock file. validate Validates a composer.json and composer.lock. why Shows which packages cause the given package to be installed. why-not Shows which packages prevent the given package from being installed. ``` # 切换成 阿里云 Composer 镜像源 ## 1. 全局配置(推荐) ```shell composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/ # 取消当前项目配置 composer config --unset repos.packagist ``` ## 2. 仅在当前项目配置 ```shell composer config repo.packagist composer https://mirrors.aliyun.com/composer/ # 取消全局配置 composer config -g --unset repos.packagist ```