Author: sepedatua

Hey, I'm SepedaTua — a self-taught programmer and sysadmin in my early 40s, running CrushEdge to share the fixes I wish I'd found faster. I spend my days wrestling WordPress, WooCommerce, Linux servers, PHP, Python, and whatever else small-business sites throw at me. After years of trial-and-error (and way too many late-night server crashes), I document the solutions that actually work — safely, with backups first, and no unnecessary fluff. Outside the terminal, I'm a dad to four awesome kids, married to my best friend, and still squeezing in some video games when the house quiets down. If you're stuck on a problem, grab a coffee and let's sort it out together.
Hey, I'm SepedaTua — a self-taught programmer and sysadmin in my early 40s, running CrushEdge to share the fixes I wish I'd found faster. I spend my days wrestling WordPress, WooCommerce, Linux servers, PHP, Python, and whatever else small-business sites throw at me. After years of trial-and-error (and way too many late-night server crashes), I document the solutions that actually work — safely, with backups first, and no unnecessary fluff. Outside the terminal, I'm a dad to four awesome kids, married to my best friend, and still squeezing in some video games when the house quiets down. If you're stuck on a problem, grab a coffee and let's sort it out together.

How to tar.gz

tar is a program which combine several files into one (eg: files.tar). gz or gzip is a program to compress files (eg: files.gz). Both are Linux programs. A tar.gz file is a resulting file from several files combined together and then compressed. To combine and compress a folder: tar czf filename.tar.gz /path/to/some/folder To extract a tar.gz file: tar -zxvf filename.tar.gz…

Read More »

How to backup and restore PuTTY settings

PuTTY is a free implementation of Telnet and SSH for Win32 and Unix platforms, along with an xterm terminal emulator. It is written and maintained primarily by Simon Tatham. Official PuTTY site is: http://www.chiark.greenend.org.uk/~sgtatham/putty/. PuTTY is an open source software and its free, licensed under MIT license. I’ve been using PuTTY for years, its easy to use. So far, only…

Read More »

How to check validity of an URL

How to check validity of an URL. 1. Using Regex if (ereg(“^(http|https|ftp)\://[a-zA-Z0-9\.-]+\.[a-zA-Z0-9]{1,3}(:[a-zA-Z0-9]*)?/?([a-zA-Z0-9\._\?\,\’/\\\+&%\$#\=~-])*$”, $url)) { echo ‘URL Correct’; } else { echo ‘Bad URL’; } This will validate URL with http, https and ftp schema. 2. Using fsockopen $url = parse_url($url); $conn = fsockopen($url[‘host’], 80); if (!$conn) die(‘Cannot connect!’); fwrite($conn, “GET {$url[‘path’]} HTTP/1.0\r\nHost: {$url[‘host’]}\r\nConnection: close\r\n\r\n”); $header = fgets($conn); if (preg_match(‘|HTTP/\S+\s+[2-3]\d\d|i’, $header))…

Read More »