Dev
搜索

Dev

sudo 用法
发表于2024-09-06|php
指定用户运行1sudo -u www-data vim info.php 从当前用户切换到 www-data 用户1sudo su - www-data 添加用户组1sudo groupadd -f -g 33 www-data 添加用户1sudo useradd -u 33 -g 33 -m -s /bin/bash www-data
docker swarm 滚动更新
发表于2024-08-12|docker
123docker service create --name app_tarot --publish 8080:8888 --replicas 3 ccr.ccs.com/test/tarot:latestdocker service update --image ccr.ccs.com/test/tarot:latest app_tarot --force
laravel 关闭 debugger
发表于2024-07-18|php
在env文件中增加 1DEBUGBAR_ENABLED=false
certbot Ubuntu 自动更新 nginx证书
发表于2024-07-18|php
安装 12sudo snap install --classic certbotsudo ln -s /snap/bin/certbot /usr/bin/certbot 获取证书 1sudo certbot certonly --webroot -w /data/wwwroot/iguojin.com/ -d iguojin.com 挂载docker 1/etc/letsencrypt:/etc/nginx/ssl/letsencrypt 配置nginx 12ssl_certificate /etc/nginx/ssl/letsencrypt/live/iguojin.com/fullchain.pem;ssl_certificate_key /etc/nginx/ssl/letsencrypt/live/iguojin.com/privkey.pem; 自动更新 1sudo certbot renew --dry-run 执行这个命令后,他会自动配置定时任务,在如下位置之一 123/etc/crontab//etc/cron.*/*syst...
wsl ubuntu 安装 oh-my-zsh
发表于2024-06-25|ubuntu
安装zsh 1sudo apt install git zsh -y 安装oh-my-zsh码云地址 1https://gitee.com/mirrors/oh-my-zsh 执行其中的tools/install.sh 如果无法clone github代码可以尝试把ip写入host 安装自动补全 1git clone https://gitee.com/mirrors/zsh-autosuggestions.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions 修改配置 ~/.zshrc 1plugins=(git zsh-autosuggestions)
mysql coalesce json处理操作符
发表于2024-06-12|mysql
COALESCE 返回第一个非空值 1select COALESCE(country,extra_fields->>'$.buyer_nationality') as country_code 可以多个参数 ->和->>差异 12-> 永远返回的是json,例如返回字符串abc,则返回的是"abc",有引号->> 返回本来的值,没有引号,一般用`->>`可能更合适 获取json字段中的值 1SELECT VALUE->>"$" FROM email_rule_items
打包phar直接运行
发表于2024-06-06|php
准备 下载swoole cli,其中有一个pack-sfx.php php.ini中有个phar.readonly = Off 打包phar123456789101112131415161718192021222324252627282930313233343536373839404142<?php// 禁止缓冲输出,以便立即看到错误信息ini_set('display_errors', 1);ini_set('display_startup_errors', 1);error_reporting(E_ALL);// 确保Phar扩展可用if (!extension_loaded('phar')) { die('Phar extension is not loaded.');}// PHAR文件的名称和目标路径$pharName = 'app.phar';$projectDir = './src'; // 你的项目源代码目录//...
laravel 直接渲染模板,模板存到数据库,字符串
发表于2024-05-30|php
1234567$html = ' Hello, {{ $name }} @if($condition) There is one record @endif';return \Illuminate\Support\Facades\Blade::render($html, ['name' => 'Julian Bashir', 'condition' => true]);
php 流式请求
发表于2024-05-13|php
原生curl12345678910111213141516171819$ch = curl_init();curl_setopt($ch, CURLOPT_URL, $this->chatService->api);curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);curl_setopt($ch, CURLOPT_POST, 1);curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Content-Type: application/json', 'Authorization: Bearer ' . $this->chatService->token,]);curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([ 'model' => $this->chatService->model, 'temperature' => ...
windows wsl1 可用最新的php swoole
发表于2024-05-12|php
https://dl.static-php.dev/static-php-cli/bulk/php-8.3.3-cli-linux-x86_64.tar.gz
1…8910…102
avatar
developer
AI相伴的开发者博客
文章
1020
标签
721
分类
35
Follow Me
公告
This is my Blog
最新文章
taro+tailwind开发记录2026-04-07
hono js 使用记录2026-03-31
cmder使用记录2026-03-08
flutter getx使用记录2026-03-01
统计代码行数2026-02-27
分类
  • apicloud3
  • bootstrap8
  • cmder1
  • cocos2d-js5
  • createjs17
  • day45
  • docker16
  • egret14
标签
备份 bug SSL 部分产品对比 utf8 常用算法 nginx ffmpeg 占位符 swarm 效果 等工具 1 语法高亮 conda jssdk ibdata1 模板字符串 读取 模型初始化 wp_filter 启动 数据不更新问题 腾讯云 nginx日志 获取 恢复 我的全新开始 指定目录 无法开启 文件 攻击 M方法 macos 工作模式 laravel trait 播放声音 tsc版本不同 workerman
归档
  • 四月 2026 1
  • 三月 2026 3
  • 二月 2026 5
  • 一月 2026 3
  • 十二月 2025 5
  • 十一月 2025 2
  • 十月 2025 5
  • 九月 2025 5
网站信息
文章数目 :
1020
最后更新时间 :
© 2025 - 2026 By developer框架 Hexo 8.1.1|主题 Butterfly 5.5.4
搜索
数据加载中