Tag

macOS

macOS

Disabling the Delay of the macOS Dock Fade-in

Since windows in macOS cannot overlap the Dock, hiding the Dock often provides an effective way to gain additional screen space. This can be particularly helpful for smaller screens. Unfortunately, a delay always occurs until the Dock reappears when moving the mouse close to it. Fortunately, many hidden settings in macOS can be altered using a command line utility named defaults. To trigger the Dock's fade-in animation instantly, hence completely disabling the delay, you have to enter the follow

Sebastian Widmann

Sebastian Widmann

Webdesigner / Web developer

macOS

Clearing DNS Cache on macOS

Have you ever heard of DNS? DNS stands for Domain Name System, and it's something like the phone book of the Internet. It translates the human-readable web addresses that we enter into our browser into the numeric IP addresses that computers use to communicate with each other. In most cases, we don't even notice that our computer is performing this process in the background. But sometimes, problems with the DNS cache, such as outdated or faulty data, can lead to connection problems. In such case

Sebastian Widmann

Sebastian Widmann

Webdesigner / Web developer

macOS

Adding Directory to PATH in macOS

In macOS, the default shell is macOS. When you enter a command in the shell, macOS first checks the current directory for a corresponding program or script. If no program or script is found there, it then looks in all directories listed in the PATH variable. The following describes how to add another directory to the PATH variable. First, create a file named .zshrc in the user directory: nano ~/.zshrc In this file, add the desired directory, for example, ~/.composer/vendor/bin. You can do this

Sebastian Widmann

Sebastian Widmann

Webdesigner / Web developer

macOS Database

Locate MySQL Log Files on macOS

If you are using macOS, you can use the following SQL statements to find your MySQL logs: SHOW VARIABLES LIKE '%general_log%'; SHOW VARIABLES LIKE '%slow_query_log%'; The output should look something like this: general_log ON general_log_file /usr/local/mysql/data/localhost.log slow_query_log ON slow_query_log_file /usr/local/mysql/data/localhost-slow.log Now, you can use tail to display the latest 100 entries, for example: tail -f -n 100 /usr/local/mysql/data/local

Sebastian Widmann

Sebastian Widmann

Webdesigner / Web developer

macOS

Update Homebrew Packages

If you want to update your homebrew packages, the following commands will help you. Update package list: brew update List outdated packages: brew outdated Update outdated packages: brew upgrade Update a specific package: brew upgrade NAME_OF_PACKAGE

Sebastian Widmann

Sebastian Widmann

Webdesigner / Web developer

macOS

wget alternative for Mac

I just tried to download a firmware file for Homematic using the browser as usual. However, every time I tried to flash the firmware file, I received an error message stating that the file did not contain valid firmware. I found a suggestion online to download the file not through a browser but through the command line using wget. However, wget is not available by default on Mac OS X, so I needed an alternative solution. One option is to install wget using Homebrew, a package manager for Mac OS

Sebastian Widmann

Sebastian Widmann

Webdesigner / Web developer

macOS

Add Directory to PATH When Using macOS

The default shell when using macOS is ZSH. If you want to add a directory to the PATH variable, you can create a file named ~/.zshenv: nano ~/.zshenv Now, you can use this file to add a directory to the path, in this case, ~/.composer/vendor/bin will be added to the PATH: export PATH="$HOME/.composer/vendor/bin:$PATH"

Sebastian Widmann

Sebastian Widmann

Webdesigner / Web developer