This commit is contained in:
21
MacBook/MAC安装Drone客户端.md
Normal file
21
MacBook/MAC安装Drone客户端.md
Normal file
@@ -0,0 +1,21 @@
|
||||
> 本文作者:丁辉
|
||||
|
||||
# MAC安装Drone客户端
|
||||
|
||||
1. 使用 Homebrew 安装 Drone命令
|
||||
|
||||
```bash
|
||||
brew tap drone/drone
|
||||
brew install drone
|
||||
```
|
||||
|
||||
2. 使用命令触发 Drone 构建
|
||||
|
||||
```bash
|
||||
curl -X POST \
|
||||
-H "Authorization: Bearer $YOUR_API_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
https://your.drone.instance/api/repos/用户/仓库名/builds
|
||||
```
|
||||
|
||||
|
19
MacBook/MAC控制外屏亮度.md
Normal file
19
MacBook/MAC控制外屏亮度.md
Normal file
@@ -0,0 +1,19 @@
|
||||
> 本文作者:丁辉
|
||||
|
||||
# MAC控制外屏亮度
|
||||
|
||||
[MonitorControl仓库地址](https://github.com/MonitorControl/MonitorControl)
|
||||
|
||||
- 方法一, 命令安装
|
||||
|
||||
```bash
|
||||
brew install MonitorControl
|
||||
```
|
||||
|
||||
- 方法二, dmg 安装包安装
|
||||
|
||||
```bash
|
||||
https://github.com/MonitorControl/MonitorControl/releases/download/v4.2.0/MonitorControl.4.2.0.dmg
|
||||
```
|
||||
|
||||
|
16
MacBook/MAC数据库开关.md
Normal file
16
MacBook/MAC数据库开关.md
Normal file
@@ -0,0 +1,16 @@
|
||||
> 本文作者:丁辉
|
||||
|
||||
# MAC数据库开关
|
||||
|
||||
- 开启
|
||||
|
||||
```bash
|
||||
/opt/homebrew/opt/mysql/support-files/mysql.server start
|
||||
```
|
||||
|
||||
- 关闭
|
||||
|
||||
```bash
|
||||
/opt/homebrew/opt/mysql/support-files/mysql.server stop
|
||||
```
|
||||
|
10
MacBook/MAC浏览器无法访问不安全网站.md
Normal file
10
MacBook/MAC浏览器无法访问不安全网站.md
Normal file
@@ -0,0 +1,10 @@
|
||||
> 本文作者:丁辉
|
||||
|
||||
# MAC浏览器无法访问不安全网站
|
||||
|
||||
键盘输入回车解决
|
||||
|
||||
```bash
|
||||
thisisunsafe
|
||||
```
|
||||
|
42
MacBook/Mac使用Kvm_Client连接华为服务器遇到的问题.md
Normal file
42
MacBook/Mac使用Kvm_Client连接华为服务器遇到的问题.md
Normal file
@@ -0,0 +1,42 @@
|
||||
> 本文作者:丁辉
|
||||
|
||||
# Mac使用Kvm_Client连接华为服务器遇到的问题
|
||||
|
||||
## 第一步打开软件
|
||||
|
||||
> 准备 Java 环境才可以使用 kvm_client 连接
|
||||
>
|
||||
> [Java下载](https://www.java.com/zh-CN/)
|
||||
|
||||
下载 kvm_client_mac.zip 工具后、解压软件包、打开电脑终端进入 kvm_client_mac 解压好的目录
|
||||
|
||||
```bash
|
||||
bash KVM.sh
|
||||
```
|
||||
|
||||
### 问题一
|
||||
|
||||
```bash
|
||||
Warning: the fonts "Times" and "Lucida Bright" are not available for the Java
|
||||
```
|
||||
|
||||
[Times字体下载地址](http://legionfonts.com/fonts/times)
|
||||
|
||||
下载字体解压安装并重启软件(如果没有生效则重启 Java)
|
||||
|
||||
### 问题二
|
||||
|
||||
```
|
||||
TSM AdjustCapsLockLEDForKeyTransitionHandling - _ISSetPhysicalKeyboardCapsLockLED Inhibit Exception in thread "Thread-2"
|
||||
```
|
||||
|
||||
关闭 使用“中/英“键切换“ABC”输入法 即可
|
||||
|
||||
进入 MAC 设置页面
|
||||
|
||||
<img src="https://minio.offends.cn:9000/offends/images/kvm-mac1.png" style="zoom:25%;" />
|
||||
|
||||
关闭
|
||||
|
||||
<img src="https://minio.offends.cn:9000/offends/images/kvm-mac2.png" style="zoom:33%;" />
|
||||
|
16
MacBook/Mac删除权限被锁定的应用.md
Normal file
16
MacBook/Mac删除权限被锁定的应用.md
Normal file
@@ -0,0 +1,16 @@
|
||||
> 本文作者:丁辉
|
||||
|
||||
# Mac删除权限被锁定的应用
|
||||
|
||||
打开终端,输入命令后将应用拖拽到终端
|
||||
|
||||
```bash
|
||||
sudo rm -rf [应用路径]
|
||||
```
|
||||
|
||||
> 如果报错:Operation not permitted 则执行下一步命令,后再次执行删除命令
|
||||
|
||||
```bash
|
||||
sudo /usr/bin/chflags -R noschg [应用路径]
|
||||
```
|
||||
|
23
MacBook/Mac命令launchctl的使用.md
Normal file
23
MacBook/Mac命令launchctl的使用.md
Normal file
@@ -0,0 +1,23 @@
|
||||
> 本文作者:丁辉
|
||||
|
||||
# Mac命令launchctl的使用
|
||||
|
||||
- 查找现有的服务
|
||||
|
||||
```bash
|
||||
launchctl list
|
||||
```
|
||||
|
||||
- 停止服务
|
||||
|
||||
```bash
|
||||
launchctl stop [service-name]
|
||||
```
|
||||
|
||||
- 载服务配置,防止其在未来自动启动
|
||||
|
||||
```
|
||||
launchctl unload -w ~/Library/LaunchAgents/[service-name].plist
|
||||
```
|
||||
|
||||
|
12
MacBook/Mac安装Brew工具.md
Normal file
12
MacBook/Mac安装Brew工具.md
Normal file
@@ -0,0 +1,12 @@
|
||||
> 本文作者:丁辉
|
||||
|
||||
# Mac安装Brew工具
|
||||
|
||||
[Homebrew官网](https://brew.sh/)
|
||||
|
||||
安装命令
|
||||
|
||||
```bash
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
```
|
||||
|
136
MacBook/Mac安装终端工具.md
Normal file
136
MacBook/Mac安装终端工具.md
Normal file
@@ -0,0 +1,136 @@
|
||||
> 本文作者:丁辉
|
||||
>
|
||||
|
||||
# 部署 Oh My Zsh
|
||||
|
||||
> 本文介绍如何安装"Oh My Zsh" 终端和 "zsh-autosuggestions" 自动补全工具
|
||||
|
||||
[Github项目地址](https://github.com/ohmyzsh/ohmyzsh)
|
||||
|
||||
[Homebrew官网](https://brew.sh/)
|
||||
|
||||
1. 打开 Mac 终端输入下载命令(下列三种方式都可以,建议使用 curl 因为 mac 一般自带哈哈)
|
||||
|
||||
| Method | Command |
|
||||
| :-------: | :----------------------------------------------------------: |
|
||||
| **curl** | `sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"` |
|
||||
| **wget** | `sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"` |
|
||||
| **fetch** | `sh -c "$(fetch -o - https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"` |
|
||||
|
||||
2. 启用插件
|
||||
|
||||
```bash
|
||||
vi ~/.zshrc
|
||||
```
|
||||
|
||||
3. 替换如下内容
|
||||
|
||||
> 原内容如下
|
||||
>
|
||||
> ```bash
|
||||
> plugins=(git)
|
||||
> ```
|
||||
|
||||
修改后
|
||||
|
||||
```bash
|
||||
plugins=(
|
||||
git
|
||||
bundler
|
||||
dotenv
|
||||
macos
|
||||
rake
|
||||
rbenv
|
||||
ruby
|
||||
)
|
||||
```
|
||||
|
||||
4. 重启终端查看效果
|
||||
|
||||
# 部署 zsh-autosuggestions
|
||||
|
||||
[Github项目地址](https://github.com/zsh-users/zsh-autosuggestions)
|
||||
|
||||
1. 克隆仓库
|
||||
|
||||
```bash
|
||||
git clone https://github.com/zsh-users/zsh-autosuggestions.git ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
|
||||
```
|
||||
|
||||
2. 修改配置文件
|
||||
|
||||
```bash
|
||||
vim ~/.zshrc
|
||||
```
|
||||
|
||||
3. 添加 `zsh-autosuggestions` 到 plugins=() 模块内
|
||||
|
||||
```bash
|
||||
plugins=(
|
||||
zsh-autosuggestions
|
||||
)
|
||||
```
|
||||
|
||||
4. 重启终端查看效果
|
||||
|
||||
# 更换主题
|
||||
|
||||
[主题展示](https://github.com/ohmyzsh/ohmyzsh/wiki/Themes)
|
||||
|
||||
1. 编辑配置文件
|
||||
|
||||
```bash
|
||||
~/.zshrc
|
||||
```
|
||||
|
||||
2. 找到 `ZSH_THEME` 配置
|
||||
|
||||
```bash
|
||||
ZSH_THEME="agnoster"
|
||||
```
|
||||
|
||||
# 安装字体
|
||||
|
||||
[Github项目地址](https://github.com/powerline/fonts)
|
||||
|
||||
1. 克隆仓库
|
||||
|
||||
```bash
|
||||
git clone https://github.com/powerline/fonts.git --depth=1
|
||||
```
|
||||
|
||||
2. 安装
|
||||
|
||||
```bash
|
||||
cd fonts
|
||||
./install.sh
|
||||
```
|
||||
|
||||
3. 清除安装包
|
||||
|
||||
```bash
|
||||
cd ..
|
||||
rm -rf fonts
|
||||
```
|
||||
|
||||
**更换字体**
|
||||
|
||||
1. Vscode更换字体
|
||||
|
||||
打开vscode > Settings > 搜索font > 找到`Terminal › Integrated: Font Family`
|
||||
|
||||
填写字体(格式如下)
|
||||
|
||||
可以用 "," 来分隔多个字体
|
||||
|
||||
```bash
|
||||
Go Mono for Powerline,Hack
|
||||
```
|
||||
|
||||
2. Mac 默认终端更换字体
|
||||
|
||||
点击左上角终端 > 偏好设置 > 描述文件 > 更改字体 > 点击搜索添加
|
||||
|
||||
3. Item2 终端更换字体
|
||||
|
||||
点击左上角iTerm2 > Preferences > Profiles > Text > 勾选 Use built-in Powerline glyphs
|
36
MacBook/Vscode配置特殊SSH协议.md
Normal file
36
MacBook/Vscode配置特殊SSH协议.md
Normal file
@@ -0,0 +1,36 @@
|
||||
> 本文作者:丁辉
|
||||
|
||||
# Vscode配置特殊SSH协议
|
||||
|
||||
> 连接过老版本的服务器时,有些服务器SSH会报错,解决方法如下
|
||||
|
||||
打开 vscode ssh 配置文件
|
||||
|
||||
```bash
|
||||
## START GITPOD INTEGRATION
|
||||
## This section is managed by Gitpod. Any manual changes will be lost.
|
||||
Include "gitpod/config"
|
||||
## END GITPOD INTEGRATION
|
||||
|
||||
#普通
|
||||
Host 192.168.1.1
|
||||
HostName 192.168.1.1
|
||||
User root
|
||||
|
||||
#带端口
|
||||
Host 192.168.1.2
|
||||
HostName 192.168.1.2
|
||||
Port 22
|
||||
User root
|
||||
|
||||
#特殊协议
|
||||
Host 192.168.1.3
|
||||
HostName 192.168.1.3
|
||||
User root
|
||||
Host *
|
||||
KexAlgorithms +diffie-hellman-group-exchange-sha1
|
||||
HostKeyAlgorithms +ssh-rsa
|
||||
ProxyCommand nc -X connect -x 127.0.0.1:15732 %h %p
|
||||
```
|
||||
|
||||
|
5
MacBook/软件记录.md
Normal file
5
MacBook/软件记录.md
Normal file
@@ -0,0 +1,5 @@
|
||||
> 本文作者:丁辉
|
||||
|
||||
# 软件记录
|
||||
|
||||
- SFTP [filezilla](https://filezilla-project.org/)
|
Reference in New Issue
Block a user