Purging a user on Ubuntu/Debian
I wrote a bash script that, given a user, finds all instances of his/her public keys, deletes them, then deletes the user. It’ not perfect and it’s my first bash script that actually uses control structures.
To use it, run this:
bash -c "`curl -L http://gist.github.com/raw/282619/cafe0b353672a4de292586951f88ab82d0b50a1c/purge_user.sh`"
Ruby 1.8.7 and ERB gotcha
While pairing with Bo on a new project, we were stumped with an odd issue with random HTML going missing.
It turns out <% # comment %> is not the same as <%# comment %>. Using <%# comment %> also comments all HTML until the next %> on another line after the initial comment.
So:
<% # comment %> foo <%= 'hello' %> bar
Will print
hello bar
but
<%# comment %> foo <%= 'hello' %> bar
will print the intended result of
foo hello bar
Solution: Find and replace all instances of <% # with <%#.
Odd AFP issue: Fixed!
So I bought myself a Mac Mini Server to play with, but I was rather dismayed when I tried to connect to a share on it for the first time, I got an error saying:
The operation can’t be completed because the original item for “______” can’t be found.
However, the other machines I have can access it fine, which narrowed it down to some weird issue on my computer. After some searching, someone recommended I recreate the /Volumes folder as root. I didn’t want to do this, so I compared permissions and found that my /Volumes folder was write-only as root (drwxr-xr-x), but the one on the Mac Mini had full access (drwxrwxrwx), so I did a sudo chmod a+w /Volumes and it was all fixed!
Geek, gamer, developer, and a part-time ninja. I work at