Archive September 2023


How to execute multi search msearch query in ElasticSearch with PHP

ElasticSearch gives you the ability to execute multiple queries in a single request by using the Multi-Search API

How to accept gzip with Symfony HTTP Client

Recently, I wrote an HTTP parser using Symfony HTTP client, and I wanted to save some bandwidth because I was using proxies.

One way to save bandwidth is to fetch compressed responses and then decompress them.

HTTP servers and clients use Gzip/deflate or Brotli.

Expose your local server with Cloudflare Tunnels for free

Have you ever needed to expose your local web server to the public Internet? There are a lot of tools out there that will help you do that. Most of them have free versions with limited features and full-featured paid versions.

In this post, I'll demonstrate totally free method to expose your local webserver that is totally free with HTTPS support - Cloudflare Tunnels.

Gitlab fails to pull image from docker repository

Today, when running CI for one of my projects, I got a pipeline error for my master branch. At first, I was a bit nervous because I'd already deployed these changes, but then, when I looked into the error itself, I was relieved, because it was not the tests that failed, but rather the downloading of the docker image.

What is Bun JS, and why it's here to stay

Bun is an all-in-one toolkit for JavaScript and TypeScript applications. The toolkit includes runtime, package manager, bundler, and test runner.

Bun vs Node JS: Features and Performance

Just a few days ago, Bun was released - Bun v1.0 - the first stable version.

The JS community has been really active these last few days. People are playing around with Bun, testing, and doing benchmarks.

Bun goal is to replace Node.js, and it claims that it's better, faster, and simpler to use. It reduces complexity by having a lot of tools built-in.

In this post, I'll compare the two and outline their pros and cons.

How to install PHP 8.3 on MacOS

PHP 8.3 will be released on November 23, 2023.

Until then, you can play around and test the beta versions which are already out. In this post, I'll show you how to install the beta version on your Mac.

How to match URL with Symfony Router

Have you ever needed to get a route name based on a given URL in Symfony? It might be a weird use case, but the RouterInterface in Symfony has the match() method that will help you do just that.

How to delete doctrine entity by ID in Symfony

The easiest way to remove an entity in Doctrine ORM is by using the $entityManager->remove($entity) method and then calling $entityManager->flush().

How to reload ZSH configuration

I've been using Zsh with Oh-My-Zsh for a long time. All MacOS users have the Zsh (Z shell) installed and configured by default. 

My Zsh configuration changes very rarely, but when it does, I need to restart my shell in order for my changes to take effect. Since I'm using tmux I can open a new window (which loads a new Zsh instance), but most of the time, I prefer to reload the current window.

To reload your Zsh (Z shell) .zshrc configuration, you can use the following command

$ exec zsh