domingo, 23 de noviembre de 2014

Temporarily ignore people in IRC

I'm using irc more and more for my communication with others.  And spending more time in IRC means that it makes more sense to optimize it.  And also, erc is a good playground for us, elisp hackers :)

So when someone is bitching or saying nonsensic BS on some IRC channel (or slack, or hipchat, or anything that supports bitlbee), you can ignore him/her, but often you forget to unignore, and after a few hours they tell you something important and you just miss it.  Not good.

So here's a timed ignore command for erc


(defun erc-cmd-TMPIG (&rest users)
  (let ((b (current-buffer)))
    (dolist (user users)
      (erc-process-input-line (format "/ignore %s" user)))
    (run-at-time (* 60 10) nil
                 (lambda ()
                   (dolist (user users)
                     (with-current-buffer b
                         (erc-process-input-line (format "/unignore %s" user))))))))


Yes, some of you reading this will be the victims of this... :)

EDIT: This code needs to be in a file with lexical scope active. otherwise, use lexical-let instead of let

jueves, 13 de noviembre de 2014

Checking what's new with git

Short post today, but kinda useful IMHO.

From time to time I have to show my bosses what our team has done in the last period. We use 2 weeks as our sprint lenght (although we're not following scrum strictly).

Anyway, I was looking for a way to summarize the activities of the team, and instead of trying to remember, or having to write annotations for the next report, I just crafted this nifty little git log command which allows me to know which branches have been merged to master in the last 2 weeks.

So now, 5 minutes before the meeting I just run it and see what I have to debrief to my bosses (or other teams in the company).

git log --since=2.weeks.ago --merges --branches=master --first-parent --graph --pretty=oneline | sed -e 's/.* from/*/'  

Try it in your repos, and see how it works for you. For me it pretty much nails it.