Subscribe

Purging a user on Ubuntu/Debian

No comments
Jan
21

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`"

View the source on Gist

Ruby 1.8.7 and ERB gotcha

2 comments
Dec
8

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!

1 comment
Nov
14

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!

  • Page 1 of 2
  • 1
  • 2
  • >