Using grep on live active log files

I had a need recently to where I needed to grep an Apache httpd log file to see if a certain web subfolder was accessed. I wanted to grep the access log file which has historical and live data coming into it, and found this to be a great solution. Sharing it here in case it helps someone in the future! [Read More...]

Use GeoIP and htaccess to deny countries access to your website

I run about a dozen websites, and one of them switched over to the XenForo forum software. The problem with forums is once the spambots find it, they're registering like crazy. My best efforts to use CAPTCHA didn't work well. Then I added a question which uses AJAX to verify the answer against an external API. That helped but they were still able to figure out a valid answer. They then were manually verifying the registration via email. My best efforts to stop them really only slowed them down. I wanted it to end. Using a self-hosted Piwik analytics instance (I love Piwik) I was able to determine that most of the spammers came from India and China. [Read More...]

Windows Media Center status light using a ThingM blink(1) USB RGB LED

I may be late to the Windows Media Center party, but now that I'm here, I'm not going home. I love Windows Media Center! In early 2015 I got an HDHomerun Prime CableCard TV Tuner and set it up to work with Windows Media Center (WMC) on my Windows 7 machine. WMC was on my primary PC until recently because I wanted to upgrade to Windows 10. I migrated my WMC to a Mac Mini running bootcamp and Windows 7. It's working great! I use WMC extenders to watch TV around my house. My Mac Mini is running headless (that is, there is no monitor, mouse or keyboard attached), so it's hard to see what its doing unless I remote into it. [Read More...]

Raspberry Pi – How to spoof MAC address

I've tried a lot of Raspberry Pi projects and the only one I've stuck with is tracking airplanes using ADSB and feeding that data to FlightAware using their PiAware system. The PiAware image for the Pi uses the eth0 MAC address to create a unique ID for the feeder you're running. The downside with doing this is that if your Raspberry Pi breaks, dies, or if you upgrade to a new one like the Raspberry Pi 3, then PiAware will create a whole new feeder site. So much for your awesome feeder streak! The solution is to spoof your eth0 MAC address on the new Raspberry Pi! [Read More...]

WordPress – Only logged in users can view your website

I had a WordPress site requirement where only logged in users could see the site and it's contents. I came across this bit of code a few years ago and found it to be helpful. Place it into your functions.php and when a visitor comes along who is not logged in, it'll redirect them to the wp-login.php page to login. Once logged in, then they can view the site without being blocked. This is an example where it can help keep unwanted visitors away from the content of your site. It's been working great and I wanted to share it. [Read More...]