[HOW-TO] Homebrew: remove a formula and all its dependencies

[HOW-TO] Homebrew: remove a formula and all its dependencies

 

17 Kudos

Since homebrew does not officially support an automated way to do that, I created a small zsh function to remove a formula and all its dependencies.

I use zsh on the Mac so the function works with it. Feel free to adjust it if you are using bash or something else.

brew-remove-with-deps() {
  formula="$*"

  if [ "x$formula" = "x" ]
  then
     echo "Invalid empty parameter"
  else
     echo "Removing" "$formula" "and all its deps.."
     brew rm $formula
     brew rm $(join <(brew leaves) <(brew deps "$formula"))
  fi
}

And, just for testing purposes:

elbryan@snowbox ~ % brew-remove-with-deps sloccount
Removing sloccount and all its deps..
Uninstalling /usr/local/Cellar/sloccount/2.26...
Uninstalling /usr/local/Cellar/md5sha1sum/0.9.5...

Et voilà.

References:
[1] – Stackoverflow – Uninstall / remove a Homebrew package including all its dependencies

April 16, 2013 0 comments Read More
[HOW-TO] Activate next UITextField in UITableView (iOS)

[HOW-TO] Activate next UITextField in UITableView (iOS)

 

25 Kudos

Update: After that Matteo pointed out the fact that I had everything to be able to access to each UITableViewCell’s instances, I decided to update this blogpost accordingly.

One of the most convenient automations that a developer should build into his applications is the capability of moving to the next (text)fields in a form.

Unfortunately, this automation is not eased by Apple in its frameworks and, thus, require the developer to provide an extra-effort on his side to make this to happen.

This post is not over yet…

February 8, 2013 3 comments Read More
[HOW-TO] DLNA home server with Linux

[HOW-TO] DLNA home server with Linux

 

78 Kudos

A quick disclaimer: This guide contains references on how to install and configure miniDLNA in the Gentoo/Linux environment. Still, the majority of the suggestions and all the settings are meant to be distro-agnostic.

We just bought the Samsung UE46ES8000 LED TV and I wanted to share all the music and videos I have on my home server with the TV.
I spent a whole day to figure out what program should I’ve been using and I tried a couple of alternatives. I came up with the conclusion that MiniDLNA is probably the best solution for me.

This post is not over yet…

December 19, 2012 3 comments Read More
[HOW-TO] Automatically download your favourite TV Series – Part II

[HOW-TO] Automatically download your favourite TV Series – Part II

 

24 Kudos

After wondering about what I proposed yesterday, I realised that such solution is a PITA. Specifically, it involves too many things for such a comparatively trivial task.

This post is not over yet…

October 16, 2012 1 comment Read More
[HOW-TO] Automatically download your favourite TV Series

[HOW-TO] Automatically download your favourite TV Series

 

23 Kudos

This blogpost explains how to setup an environment to automatically download TV series when they come up in the net. Probably it’s not the most legal thing in the world but I’m a scientist, you know.

It’s not easy, not trivial, not error-free and it requires you to have some *nix/scripting skills (besides you having a server, or generally speaking, a computer that stays up 24/7).

This post is not over yet…

October 15, 2012 1 comment Read More