my Q2 plan

Q2 Plan
Asset Management
Weekly Regular Investment Strategy: Dividends, Healthcare, India, USA (4 categories, 100, 100, 150, 150 units respectively).
Business Goals
Complete bank card processing.
    Launch the mini-program.
    Set up the company’s own server and formulate appropriate company policies.
    Personal Goals
Maintain financial records.
    Read regularly.
    Organize the new residence.
    Plan long-term objectives.
    Continuously pursue learning.
    Work Objectives
Fulfil assigned tasks.

作者:庞学军

2025 plan

i decide to write daily report, because sometime i feel shy when someone read my idea or daily article.
so it's okay if they not understand my article.
i wanna writing but dont to be know what i writing.
this is a good way to use english writing.
i will continue to writing to show idea to me .

in pass three month, i learn swoole,go in code.

i use go to write a proccess to images, return unique images.

gin and hyperf use in my project connect grpc and http.

first, it should be a great company have a huge aim.

i should make a plan to make a great company.

ai or artificial intelligence is a great way to make a great company.

maybe first step is difficult. second step is more difficult.

作者:庞学军

think something in ai

Perhaps AI will continue to improve significantly in the future.

Specifically, advanced AI like DeepSeek is transforming the world.

We can achieve remarkable things through AI.

I’m uncertain about what the future holds.

But I’m determined to adapt by leveraging AI tools.

For example:

  • Coding tasks
  • Article writing
  • Knowledge sharing
  • And more

By 2025, I believe AI capabilities will advance exponentially.

I plan to keep learning programming languages like Go, frameworks like Swoole and Hyperf,

focusing on high-performance computing.

作者:庞学军

php-fpm内存跑满

参考文档
https://blog.csdn.net/weixin_45526912/article/details/135149425
https://blog.csdn.net/guo_qiangqiang/article/details/89532660
https://zhuanlan.zhihu.com/p/405981279
https://www.cnblogs.com/zoutong/p/13523945.html

pm.max_children = 80

问题

  1. php-fpm内存跑满
  2. laravel的afterResponse
  3. 接口处理耗时任务
  4. 导致进程没有释放
  5. 服务器内存不够,直接跑满所有内存。
    request_terminate_timeout
    优化方案
    1、耗时任务放到队列里
    2、合适的max_children,避免进程过多,结合服务器内存
    3、使用opcache缓存,workman swoole 等

作者:庞学军

nginx配置跨域

不走代码配置跨域
使用nginx配置跨域

配置示例

1
2
3
4
5
6
7
8
9
10
server {
listen 80;
server_name demo.pangxuejun.cn;
root "~/public";
add_header 'Access-Control-Allow-Origin' "*" always;
add_header 'Access-Control-Allow-Credentials' 'true' always;
add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS' always;
add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With,authtoken' always;
}

作者:庞学军

一些感悟

人生是一件很长的事情,工作也是一样,但是生活却很短。
我们要做的长期主义,一直成长。
技术和人生都是这样。
并没有要求短时间有回报。
但是你一定要懂得持续成长。
程序员这件是只是人生的一个小阶段。
不是一生,技术是一个不断更新的过程。
不一定要靠语言go php 证明什么。
成长也是有痕迹的,学习不间断。

作者:庞学军

ubuntu22.04开机任务

在目录/etc/init.d/目录新建脚本#
sudo vim /etc/init.d/startup.sh

Copy
#!/bin/bash

Only for test

touch /root/1.txt
添加执行权限#
sudo chmod +x /etc/init.d/startup.sh

添加启动脚本#
sudo update-rc.d startup.sh defaults 90

查看服务列表#
sudo service –status-all

测试是否生效#
Copy
sudo service startup.sh start

sudo service startup.sh stop
或者直接重启验证

删除任务#
sudo update-rc.d -f startup.sh remove

Tips:此方法只在ubuntu22.04测试可用,其他版本未验证。

来源:https://www.cnblogs.com/ALice1024/p/17302426.html

作者:庞学军

宝塔面板

安装

1
2
3
4
5
6
7
8
9
10
11

Centos安装脚本
yum install -y wget && wget -O install.sh https://download.bt.cn/install/install_6.0.sh && sh install.sh ed8484bec
复制
Ubuntu/Deepin安装脚本
wget -O install.sh https://download.bt.cn/install/install-ubuntu_6.0.sh && sudo bash install.sh ed8484bec
复制
Debian安装脚本
wget -O install.sh https://download.bt.cn/install/install-ubuntu_6.0.sh && bash install.sh ed8484bec
复制

支持ipv6访问

1
sudo echo '::' > /www/server/panel/data/ipv6.pl && sudo /etc/init.d/bt restart

作者:庞学军