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

Read the rest of this entry »


Problem: Passwords are getting ‘stolen’ even faster than they are (used to be) guessed.  By ‘stolen’ I mean taken, en mass, from some site (cf. the Sony fiasco some years ago).  This actual happens all the time – usually unreported because what doctor’s office has intrusion detection on their in-house network?!?  So here’s a way to make an easy-to-remember, strong password that is unique to every website you’ll visit. Read the rest of this entry »

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?!? Read the rest of this entry »


I want to setup a remote repository in my git project so that whenever I push to the ‘real’ remote repository that I cloned from, I also push to a second repo – a (literally) backup repository.  Further, I want the ability to push to this backup repository whenever I wish – perhaps on every commit.  I tend to commit often, make throw-away branches, etc.  I don’t like having much that is not backed up at any point in time (ex. Time Machine on my work Mac)

End goal: I want a backup/off-site, ‘ghost’ repo that I can push to frequently in case I do something horrid to one of the operating systems on my laptop and render unreadable the partition that contains all my work (not that such an occurrence would happen… at least not again this month!). Read the rest of this entry »


I need to break a paragraph into lines that are no longer than 60 characters for a particular, text-only email template.  I want the lines to break at/on spaces (because just breaking at the 60th character would probably cut words in half, randomly… not very professional!). Read the rest of this entry »