切换导航
新动弹计划
搜索
文章
动弹
排行榜
登录
注册
搜索 “#daily tips#” ,共找到 530 项结果
×
搜索
文章
动弹
热门关键词
重读《掌控习惯》
ChatGPT
Docker
Laravel
读书
跑步
#daily tips#
#稍后阅读#
Falcon
2022-07-10 04:23
冒泡
#daily tips#
#php#
找出php加载的全部ini ,可以诊断加载了哪些不必要的扩展,因为除了指定的ini,它还会扫描某个目录的(在php5.6是conf.d),而那些扩展可能因为不再支持而移除使启动出错,特别是在brew update之后或者重新安装php。
/usr/local/opt/
php@5.6
/bin/php --ini
0 赞
暂无评论
查看
Falcon
2022-07-06 07:50
冒泡
#daily tips#
#php#
nginx 中 fastcgi_intercept_errors on 表示接收fastcgi输出的http 1.0 response code,后端php可以输出header指示nginx输出什么错误页面。开启这个之后,我们才能在php里面自定义错误代码和页面。
0 赞
暂无评论
查看
Falcon
2022-07-05 16:59
冒泡
#daily tips#
很不错的Linux可视化工具,能非常直观地看到 cpu 、内存、磁盘使用等情况,跟htop有异曲同工之妙。
https://github.com/aristocratos/btop
同类还有bottom:
https://github.com/ClementTsang/bottom
gtop:
https://github.com/aksakalli/gtop
gotop:
https://github.com/xxxserxxx/gotop
其他替换:
these have been around for years. All of them are terminal-based tools.
Grandpa
top
. Written 36 years ago, C, installed by default on almost every Unix descendant.
bashtop
, in pure bash! Beautiful and space efficient, and
deserves special comment
.
bpytop
, @aristocratos, the author of bashtop, rewrote it in Python in mid-2020; it's the same beautiful interface, and a very nice alternative.
htop
. A prettier top. Similar functionality. 16 years old!
atop
. Detailed process-focused inspection with a table-like view. Been around for 9 long years.
iftop
, a top for network connections. More than just data transfer, iftop will show what interfaces are connecting to what IP addresses. Requires root access to run.
iotop
, top for disk access. Tells you which processes are writing to and from disk space, and how much. Also requires root access to run.
nmon
a dashboard style top; widgets can be dynamically enabled and disabled, pure ASCII rendering, so it doesn't rely on fancy character sets to draw bars.
ytop
, a rewrite of gotop (ca. 3.0) in Rust. Same great UI, different programming language.
slabtop
, part of procps-ng, looks like top but provides kernel slab cache information! Requires root.
systemd-cgtop
, comes with systemd (odds are your system uses systemd, so this is already installed), provides a resource use view of control groups -- basically, which services are using what resources. Does not require root to run.
virt-top
top for virtualized containers (VMs, like QEMU).
ctop
top for containers (LXC, like docker)
0 赞
暂无评论
查看
Falcon
2022-07-04 06:36
冒泡
#daily tips#
测试php-fpm配置是否正确
php-fpm -t
[04-Jul-2022 14:34:52] NOTICE: configuration file /usr/local/etc/php/8.0/php-fpm.conf test is successful
0 赞
暂无评论
查看
Falcon
2022-07-03 05:03
冒泡
#daily tips#
MacOS 更改输入法切换快捷键
参考Rio的回答: “默认是没有启用快捷键切换输入法的。在 System Preferences / Keyboard / Keyboard Shortcuts / Keyboard & Text Input 里面勾选 Select next source in Input menu,然后点击定义快捷键。我一般设置的是 Ctrl + Space (和 Windows 下类似)。 ”
0 赞
暂无评论
查看
Falcon
2022-07-01 23:49
冒泡
#daily tips#
一个漂亮的文档生成器,让你专注于内容而不是技术。
https://docusaurus.io/docs
0 赞
暂无评论
查看
Falcon
2022-07-01 01:24
冒泡
#daily tips#
有哥们说,自从国内推出19开头的手机号之后,正则表达式改成了/^1[3-9]\d{9}$/ ,哈哈哈,也行吧……
0 赞
暂无评论
查看
Falcon
2022-06-30 06:17
冒泡
#稍后阅读#
#daily tips#
支持CLI上传的网盘,号称无限临时空间,测试了速度也还行,感觉不错。分了国内版
https://ttttt.link/
和高手版
https://tmp.link/
,我注册了个所谓的高手版的,它说没区别,但我上午用好像会限制区域,不搭梯子国内直接访问tmp会报区域限定。我想到的用途,因为它支持7天的大文件存储(好像有下载又会自动续期),这个可以用来做异地备份,相当于保留七天的全量异地备份。跟我用坚果云备份是一样的,不过它的流量和存储远大于坚果云,并且不需要自己另外写过期删除的功能。可能为了安全起见,压缩时要加个密码。
v2ex讨论:
https://www.v2ex.com/t/862795#reply44
0 赞
暂无评论
查看
Falcon
2022-06-28 23:13
冒泡
#daily tips#
#php#
php_sapi_name
(PHP 4 >= 4.0.1, PHP 5, PHP 7, PHP 8)
php_sapi_name(): string|false
php_sapi_name — 返回 web 服务器和 PHP 之间的接口类型
返回接口类型的小写字符串, 或者在失败时返回 false。
尽管不够全面,可能返回的值包括了 apache、 apache2handler、 cgi (直到 PHP 5.3), cgi-fcgi、cli、 cli-server、 embed、fpm-fcgi、 litespeed、 nsapi、phpdbg。
注意: 另一种方法
PHP 常量 PHP_SAPI 具有和 php_sapi_name() 相同的值。
示例 #1 php_sapi_name() 例子
以下例子检测了子字符串 cgi,因为它也有可能会是 cgi-fcgi。
<?php
$sapi_type = php_sapi_name();
if (substr($sapi_type, 0, 3) == 'cgi') {
echo "You are using CGI PHP\n";
} else {
echo "You are not using CGI PHP\n";
}
?>
ref:
https://www.php.net/manual/zh/function.php-sapi-name
0 赞
暂无评论
查看
Falcon
2022-06-27 07:12
冒泡
#daily tips#
随航 iPad 连接超时的解决方法(解决了我的问题):
在mac端:系统偏好设置-> apple id -> 删除ipad -> 删除老mac。
ipad端修改机器名称为英文,退出apple id,重启,登录apple id。
ref:
https://www.zhihu.com/question/385028253
0 赞
暂无评论
查看
28
29
30
31
32