Archive for the ‘Linux’ Category

grep without comments

Posted: 2019/01/04 in Linux, PHP


tl;dr: Using grep to see only lines that are not comments nor just newlines.

In order to only see lines that are actually doing something – not a comment nor empty newline – I use the following grep:

grep -v ‘^ \*\|^/\*\*\|^#\|^$’ name-o-file-here.php


Just needing to get this down quickly and succinctly…

The Raspberry Pi is super-fun for me as it’s a full OS (Linux, which I really like a lot) with Pins!  Current project: make a (private) website that will let me open/close and check my garage door.  Maybe more on this later.

SUPER frustrating is the inability for a web-server to control the GPIO pins on my Raspberry Pi because the web-server is not running as root.  Really?!? (more…)


I was introduced to the screen command by Ian Maddox of Seattle PHP Users Group / Meetup Group fame (Ian’s Profile). I started using it for two purposes, both having everything to do with disconnecting from the ‘session’: (1) for long-running tasks where I wanted to go do something else (ex. massive file copying) and (2) whilst on my mobile phone wherein I had no confidence I would keep my connection while doing, well, massive file copying (I guess that makes this one reason!).

I quickly mastered Ctrl-A d (detach)

But now I want to reattach to a session (from the command prompt: screen -r) AND scroll-back. (more…)

After spending WAY too much time trying to (re)learn RewriteRule nomenclature, I kept running into errors using .htaccess on a site a friend has on GoDaddy.  Ugh!

Then I came across this post:

Basically, all I had to do was add the line “Options -MultiViews” to my .htaccess file (I put it as the first line) and my RewriteRule lines started working!

Too important to not post!!

Problem: Podcasts are usually too slow to me.  Ironically, they are too often in stereo (how many microphones does it take to record my one mouth?!?) . Even worse, the audio from one podcast to the next can vary drastically in volume as well as dynamic (volume) range! (more…)