Rabin.IO Blog

0

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 0

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...

4

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...

0

[PHP] Validate Email Address Format

A quick snippet I use to validate email address format. <?php if (empty($argv[1])) { echo ‘usage: ‘ . $argv[0] . ‘ [email protected]’ . PHP_EOL; exit (1); } array_shift($argv); foreach ($argv as $key => $email)...

0

Building CinelerraCV for Fedora 22 under Docker

The Dockerfile #FROM 195a4b79eb1c #Version 0.4 FROM Fedora-Docker-Base-22-20150521.x86_64 MAINTAINER [email protected] RUN dnf update -y && dnf install -y mock rpmdevtools tmux htop && dnf clean all RUN [“dnf”, “install”, “-y”, “http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-22.noarch.rpm”, “http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-22.noarch.rpm”] RUN [“/usr/sbin/useradd”,...

0

Speed up a MySQL restore from a dump file

This is a small snippet I found to speed up importing MySQL dumps, it’s is almost as fast as coping the DB files directly. Pre INSERT Put the commands at the top of the...

0

Dynamic DNS with CloudFlare

This is a simple hack I found for my self to have a “Dynamic DNS” for my home IP. I’m using CloudFlare as my name server to manage the zone file for my domain,...

1

Setup Xdebug for remote debug over SSH

If you have PHP application you need to debug, and there is a firewall between you and the hosting server, One can use SSH to tunnel the traffic from the remote site to the...