Skip to content

Instantly share code, notes, and snippets.

View limingxinleo's full-sized avatar
🎯
Focusing

李铭昕 limingxinleo

🎯
Focusing
View GitHub Profile

Brew 安装 PHP Openssl@3 导致加密报错

  1. Open "$(brew --prefix)"/etc/openssl@3/openssl.cnf
  2. Find [default_sect] section in the file and uncomment activate = 1 under it. Then add the legact_sect section under that.
[default_sect]
activate = 1
@limingxinleo
limingxinleo / phpstan.neon
Last active April 26, 2023 03:20
常用的 PHPStan 配置
# Magic behaviour with __get, __set, __call and __callStatic is not exactly static analyser-friendly :)
# Fortunately, You can ingore it by the following config.
#
# vendor/bin/phpstan analyse app --memory-limit 200M -l 0
#
includes:
# 需要执行 composer require phpstan/phpstan-deprecation-rules --dev
- vendor/phpstan/phpstan-deprecation-rules/rules.neon
parameters:
@limingxinleo
limingxinleo / docker.md
Last active March 27, 2024 12:43
Docker 相关

安装 docker-compose

curl -L https://get.daocloud.io/docker/compose/releases/download/v2.6.1/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose

腾讯云 Alpine 容器 huichuan.uc.cn 无法正常解析

@limingxinleo
limingxinleo / swoole.md
Last active August 2, 2022 02:03
Swoole使用小节

MacOS 系统下编译 Swoole

./configure --enable-openssl --enable-http2 --with-openssl-dir=$(brew --prefix [email protected]) --enable-swoole-curl --enable-swoole-json

Swoole5

./configure --enable-openssl --with-openssl-dir=$(brew --prefix [email protected]) --enable-swoole-curl --enable-cares --enable-swoole-pgsql
@limingxinleo
limingxinleo / awesome-components.md
Last active April 12, 2024 06:40
常用的组件

常用的组件

前端

  • Luckysheet Luckysheet is an online spreadsheet like excel that is powerful, simple to configure, and completely open source.

Golang

容器

@limingxinleo
limingxinleo / docker-desktop-for-mac.md
Last active June 7, 2022 10:43
使用 Docker Desktop for Mac 时碰到的一些问题

Composer 无法访问 api.github.com

这是因为使用了 ipv6 导致的,所以直接换个源把。

解决办法

换成华为云

composer config repo.packagist composer https://mirrors.huaweicloud.com/repository/php

一定要加 -a 尤其是备份 docker 的 volume 时,不然会导致权限改变,无法使用

cp -arf source dest
@limingxinleo
limingxinleo / release.yml
Created March 12, 2022 08:58
使用 Github Action 打包并上传到 DockerHub
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
name: Release
jobs:
release:
@limingxinleo
limingxinleo / query.sql
Last active March 9, 2022 05:02
MySQL 分组查询前两条
# reply 表中,以 reply 分组,并查询每个分组 id 最小的前 2 条
SELECT r.*
FROM reply r
WHERE r.reply_id IN (1, 2)
AND 2 >= (
SELECT COUNT(*)
FROM reply
WHERE reply_id = r.reply_id
AND id <= r.id
@limingxinleo
limingxinleo / 00_README.md
Last active February 21, 2023 08:23
Vue Dockerfile

Vue Dockerfile