• Falcon
    2 小时前
    #daily tips# #php# nginx 中 fastcgi_intercept_errors on 表示接收fastcgi输出的http 1.0 response code,后端php可以输出header指示nginx输出什么错误页面。开启这个之后,我们才能在php里面自定义错误代码和页面。
  • Falcon
    今天 00:59
    #daily tips# 很不错的Linux可视化工具,能非常直观地看到 cpu 、内存、磁盘使用等情况,跟htop有异曲同工之妙。
    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)

  • WP CLI 拾零

    用WP CLI下载和配置 WordPress 1、创建网站根目录,下面的所有 example.com 都替换成你自己的域名 sudo mkdir -p /var/www/html/example.com/public_html 2、修改目录的用户,Apache 一般默认用户是 www-data,其他的话根据自己实际情况修改...

    昨天 18:44 Falcon 阅读
  • Falcon
    昨天 14:27
    charles 难用的一匹,建议换 whistle 或者 proxyman
  • Falcon
    前天 14: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
  • 编辑 brew services 正确的plist启动文件

    再一次领教 Homebrew 是多么诡异的,反直觉的。 比如说使用列出服务 brew services list Name Status User File beanstalkd started falcon ~/Library/LaunchAgents/homebrew.mxcl.beans...

    前天 13:39 Falcon 阅读
  • Falcon
    07-03 21:03
  • Falcon
    07-03 17:11
    也许审美是一个非常主观的感受,银色和深空灰都各有千秋,但在实用性的场景下,尤其是经常要需要面对不确定的光照环境,无论室内还是室外,深空灰的Macbook air相比银色有一个非常诱人、称得上杀手级的优势,就是在强光下的镜面反射要比银色弱很多,这样的效果就是不刺眼,就冲着这一点,毫无疑问我必须得选深空灰啊!什么掉色、阴郁之类的小缺点完全可以靠边站。

    准备再蹲一个深空灰16G-512G的版本,因为256G的固态硬盘真的有存储焦虑,在我装上16.99G的Xcode ,卸载掉自带的Page,Numbers、iMovie,keynote、酷乐队之后,存储空间只剩84G了,只有1/3。
  • Falcon
    07-03 13:03
    #daily tips# MacOS 更改输入法切换快捷键

    参考Rio的回答: “默认是没有启用快捷键切换输入法的。在 System Preferences / Keyboard / Keyboard Shortcuts / Keyboard & Text Input 里面勾选 Select next source in Input menu,然后点击定义快捷键。我一般设置的是 Ctrl + Space (和 Windows 下类似)。 ”