兰林

Results 113 issues of 兰林

# A ### -A 参数指定客户端的用户代理标头,即 User-Agent。 curl 的默认用户代理字符串是curl/[version]。 ```shell curl -A 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36' https://google.com ``` 上面命令将User-Agent改成 Chrome 浏览器。 ```shell curl...

常用
系统

### 场景 执行 `composer install` 时报错 ```shell > composer install The disk hosting /root/.composer is full, this may be the cause of the following exception ``` 除了这一句话什么其他的信息都没有,查看磁盘也是正常的 ### 原因 极大的可能是由于禁用了某些系统函数所导致的...

生僻
PHP

### 举例扩展名 event ### 查看扩展可选配置项 ```shell ~ phpbrew ext show event Name: event Source Directory: /Users/lanlin/.phpbrew/build/php-8.1.2/ext/event Config: /Users/lanlin/.phpbrew/build/php-8.1.2/ext/event/config.m4 INI File: /Users/lanlin/.phpbrew/php/php-8.1.2/var/db/event.ini Extension: Pecl Zend: no Loaded: yes Configure Options: --enable-event-debug[=no]...

常用
PHP

### 前期准备 1. 已经安装了 elasticsearch 2. 找到 elasticsearch.yml 配置文件,添加如下配置项 ```yml xpack.security.enabled: true ``` 通常位于 `/etc/elasticsearch/config/elasticsearch.yml`

常用
Elasticsearch

### 类型 1:文件名大小写引起 ```shell DockerFile - error dockerFile - error Dockerfile - work! ```

系统
Docker

### 原因 tar 压缩文件时,如果指定的被压缩路径非当前目录 以 gzip 格式为例: ```shell tar -zcvf foo.tar.gz ../abc # 在其他目录下,以【相对】路径的形式对 abc 目录进行压缩 tar -zcvf foo.tar.gz /xyz/abc # 在其他目录下,以【绝对】路径的形式对 abc 目录进行压缩 ``` 以上的操作都是对非当前目录进行压缩,这样会造成压缩结果带有相同的路径关联 那么,解压缩时会出现一系列因为路径不对应而无法解压的情况 ### 处理 ```shell...

常用
系统

### 背景 各种规格的屏幕实在太多了,几乎不可能为所有的屏幕尺寸设计专门的图片展示尺寸。 同时生成太多尺寸的缩放图片也极大的浪费资源。 以下尺寸基本满足大多数屏幕下的预览图显示,欢迎参考 ### 图片尺寸 (宽度) 1. 100 pixels 2. 300 pixels 3. 500 pixels 4. 750 pixels 5. 1000 pixels 6. 1500 pixels 7. 2500 pixels 至于图片高度,请根据图片实际尺寸按缩放到的宽度的比例,等比例计算出缩放后的高度。

记事
常用

### OhMyZsh ~/.zshrc ```shell ZSH_THEME="simple" plugins=(git) # HomeBrew Repos (tsinghua) export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git" export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git" export HOMEBREW_BOTTLE_DOMAIN="https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles" # PHPBrew export PHPBREW_ROOT="$HOME/.phpbrew" export PHPBREW_RC_ENABLE=1 export PHPBREW_SET_PROMPT=0 source $PHPBREW_ROOT/bashrc # ShadowSock Proxy function...

重要
常用
系统

### ~/.vimrc ```shell "设置主题+透明 autocmd vimenter * hi Normal guibg=NONE ctermbg=NONE " transparent bg colorscheme molokai "显示行号 set nu "启动时隐去援助提示 set shortmess=atI "语法高亮 syntax on "使用vim的键盘模式 "set nocompatible "不需要备份 set...

常用
系统
VIM

### 情景 明明已经设置好了代理,通过浏览器访问正常。 但是通过 curl 等工具访问时却怎么也不行。 那么这篇短文可能会有所帮助。 ### ```shell 1)curl https://www.google.com -x 127.0.0.1:1081 2)curl https://www.google.com -x http://127.0.0.1:1081 3)curl https://www.google.com -x socks://127.0.0.1:1080 4)curl https://www.google.com -x socks4://127.0.0.1:1080 5)curl https://www.google.com -x socks5://127.0.0.1:1080 6)curl...

常用
系统