Rabin.IO Blog

How to Debug PHP Script From the CLI with PHP-XDEBUG

TL;DR Set your IDE to listen for incoming connections On the CLI set the session key, export XDEBUG_CONFIG=”idekey=netbeans-xdebug” Set XDEBUG configuration (can be set as environment variables or in-line parameters) # in-line php -dxdebug.remote_enable=1...

Upgrading Fedora Installation on DigitalOcean

I found this method works for me, #Check if user is root if [[ $EUID -ne 0 ]]; then echo “Sudo privileges required!” exit 1; fi dnf update NEXT_VERSION=25 rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-${NEXT_VERSION}-$(uname -i) dnf...

ZSH Home / End Keys

Self note, Add this lines to ~/.zshrc bindkey ‘\e[1~’ beginning-of-line # Linux console bindkey ‘\e[H’ beginning-of-line # xterm bindkey ‘\eOH’ beginning-of-line # gnome-terminal bindkey ‘\e[2~’ overwrite-mode # Linux console, xterm, gnome-terminal bindkey ‘\e[3~’ delete-char...

Matching non ASCII characters in NGiNX location

If you need to match a non ASCII string with NGiNX, and don’t want to use the encoded URL, you can use this trick, location ~* (*UTF8)^/אודות$ { return 301 “https://blog.rabin.io/about-me”; } Resources http://stackoverflow.com/questions/28055909/does-nginx-support-raw-unicode-in-paths...

gnuplot icon

Visualize real-time data streams with Gnuplot

Some times when I need to troubleshoot a problem, adding some visualization to the process can help a lot, especially if one need to correlate between 2 (or more) metrics in the data. But...

Run Command Before Starting SSH Connection

This a quick hack I found while I was looking to run a knock script before connecting to servers which I have the SSH service protected with a knock sequence. In my setup I...