Skip to content

Instantly share code, notes, and snippets.

View sunxyw's full-sized avatar

sunxyw sunxyw

View GitHub Profile
sunxyw /
Created February 27, 2023 16:35
Zhamao Framework Production Dockerfile
FROM phpswoole/swoole:latest as pack
RUN echo "phar.readonly=0" >> /usr/local/etc/php/conf.d/docker-php-ext-phar.ini
COPY . .
RUN composer install --no-dev --optimize-autoloader --no-interaction --no-progress
RUN mkdir -p /app/build && /app/zhamao build --build-dir=/app/build --target=zm.phar --quiet
FROM alpine:latest as build
ADD /tmp
RUN tar -zxvf /tmp/micro-8.1.8-x86_64.tar.gz -C /tmp
sunxyw / i18n.yml
Last active May 23, 2022 09:13
Upptime 中文汉化
View i18n.yml
activeIncidents: 活动事件
allSystemsOperational: 所有系统工作正常
incidentReport: "$NUMBER 号事件报告 →"
activeIncidentSummary: 于 $DATE 打开,包括 $POSTS 个帖子
incidentTitle: $NUMBER 号事件详情
incidentDetails: 事件详情
incidentFixed: 已修复
incidentOngoing: 进行中
incidentOpenedAt: 打开于
incidentClosedAt: 关闭于
sunxyw / replace-string-in-html.php
Last active April 15, 2022 08:16
处理 HTML 中的字符串,并原样输出
View replace-string-in-html.php
$text = <<<'EOT'
<img class="bili-avatar-img" alt="这是ALT里边的文字">
<span class="bili-avatar-icon bili-avatar-size-60">
$no_tags_text = preg_replace('/<.*?>/m', '', $text);
View gist:27a91b43195270832d3d5be745abfe27
$db = mysqli_connect("localhost", "phpuser", "alm65z", "phpdb");
function sess_open($sess_path, $sess_name) {
return true;
function sess_close() {
return true;
sunxyw / cloudSettings
Last active May 18, 2020 04:10
VSCode 插件配置同步
View cloudSettings