乱谈 Vibe Coding

Vibe Coding 在当下是个时髦的词, 特别是随着 Claude Code 这样强大的工具出现。一个开发者,如果你说没有在 vibe coding,似乎就不够潮流。 可是,Vibe Codin

船大难掉头 - 随便聊聊 Jetbrains

我非常喜欢 Jetbrains 家的产品, 作为真正的 IDE , 大而全, 能够提供非常棒的开发体验。 有一种沉浸感,能让人专注在代码中。 尽管很多年前,vscode 就已经风靡

还写技术博客吗

有一个独立博客,是很多技术人的情怀。 一腔热血,苦心专研的技术,在互联网上留下自己的痕迹。 可是在 AI 的时代,技术的门槛已经极大的降低了。 两小时想

Laravel get request parameters: request() vs $request->input()

There are many ways to get the request parameters in Laravel, such as request(), $request->input(), $request->get(), but there are a little different between request() and $request->input() when the parameter is not actually passed. Sometimes it maybe cause some unexpected behavior, Let’s see: 1 2 3 4 5 6 7 Route::get('/test', function (Request $request) { dd( request('key', 'default'), $request->input('key', 'default'), $request->get('key', 'default'), ); }); When our request like this: http://localhost/test?key=, yes, we do not actually set a value for the key, the output will be:

远程开发(瘦客户端开发)指北

为什么需要远程开发 首先需要明确,本篇文章说的远程开发,不是指“远程开发工作”,而是指“远程开发环境”,在网上通常也叫瘦客户端(机)开发。 是指

How to iterate big dataset in Laravel without memory exhausted

Imagine that you have to iterate a big table in Laravel, the words “big table” means that the table not only thousands of rows, but also millions of rows. Intuitively, we may use the all() or get() method of the model to retrieve all the rows, and then iterate them. But our memory is limited, use those function may cause a memory exhausted error. Here, I will give you three ways to do this.

Laravel Tips: Is the code running in http request?

We know, the code in Laravel can run in different environment, such as http request, queue, artisan command and even in Tinker. Sometimes, we need to know the if the code is running in a http request or not. Fortunately, Laravel provide a function to do this: app()->runningInConsole(). If the code is running in a http request, it will return false, otherwise, such as in queue, artisan command, or in Tinker it will return true.

Use Docker Compose Healthy Check To Run Command Periodically in a Container

In my work, I have a domain that use the certbot container to renew the ssl certificate from letsencrypt. It has two containers work together, the certbot container and the nginx container. If the certbot container renew the certificate successfully, it will replace the old certificate file with new one. So, the nginx needs to reload the certificate file. Unfortunately, the certbot container doesn’t have a way to notify the nginx container to reload the certificate file.

Restart blog

I have been writing a blog since I graduated from college. And the old posts were deployed in different platforms. I didn’t write too much in the past years, and didn’t have too many visitors Many times, I often forget that I have a blog :) Obviously, I am not a professional blogger As a developer from China, I want to improve my English skill. I think it is a proper way to write blog in English.

How to checkout to a remote branch in git

Hi there, in this short note, I’d like to show you how to checkout to a remote branch on your local machine. Step 1: Fetch all the branches by using git fetch This command will download the new branches to your local. For more detail about git fetch, you can look at the helping document by typing: git fetch --help. After fetching, you can use the git branch -r to see all the remote branches to ensure that the branch you want to checkout has been downloaded.