gitconfig

I finally started organizing the various git commands and aliases I use alot, and published them to github. My gitconfig repo.

Some of these are useful only for projects similar to mine (fedora, tito based, bugzilla, etc) but I think some of then are generally useful.

A few favorites:
# commits not pushed to $1
unpushed = cherry -v

# ignore po files in "git log", sorry translators ;-<
slog = "!sh -c 'git log --no-merges $1 `ls | grep -v ^po`' -"

# what tag contains the sha
whatrelease = name-rev --name-only

# what branch contains the sha
contains = branch --contains

# what got pushed to master in the last hour
# based on http://stackoverflow.com/questions/3357219/expose-the-date-a-commit-was-pushed-to-a-repository
justpushed = log origin/master@{\"1 hour ago\"}..origin/master --

# show a list of branches sorted by time of last commit
brage = "!sh -c 'for C in $(git for-each-ref --sort=committerdate refs/heads --format=\"%(refname:short)\") ; do git show -s pretty=format:\"%Cgreen%ci %Cblue%cr%Creset $C\" \"$C\" -- ; done'"

# show a list of tags sorted by when they were tagged
tagage = "!sh -c 'git for-each-ref --sort=taggerdate refs/tags --format=\"%(refname:short)\"'"

# show a list of every branch and show there latests commit, sorted by last commit
brlog = "!sh -c 'for C in $(git for-each-ref --sort=committerdate refs/heads --format=\"%(refname:short)\") ; do git show -s --pretty=format:\"%Cgreen%ci %Cblue%cr%Creset $C\" \"$C\" -- ; git show -s $C ; echo; done'"

# needs python-bugzilla, and git-showbugs
openbugs = showbugs -s NEW,ASSIGNED,NEEDINFO,FAILS_QA,REOPENED,ON_DEV
closedbugs = showbugs -s PASSES_QA,VERIFIED,RELEASE_PENDING,CLOSED

# show a list of files with bug fixes in them, sorted by popularity of occurance
# aka, list the buggy files
buggyfiles = !"git log --format=\"format:%n\" --grep \"^[[:digit:]]\\+:\" --name-only | grep . | sort | uniq -c | sort -n"

N sources of nerd guilt

Things that cause tech guilt.

– I should backup more often.
– I should use any/stronger crypto on everything.
– I should really change my password
– I should blog/twitter/facebook/otherwise broadcast desperate attempts to get people to pay attention to me more
– I should blog/etc less
– I should update this system
– I should really automate this task
– I should write this code using WhizBangTech instead of the way that works and I actually know.
– I should optimize this code
– I should document this.
– I should file a bug report about this.
– I really should refactor this code.

ring ring, fedoraphone!

I managed to get one of my machines installed with a os version I didn’t want, and no way to change it. Normally, this means it’s time to koan/cobbler to get it re-provisioned. But I couldn’t log into the machine to do anything. I could of reinstalled it from a cd/dvd, but I hate burning cd/dvd’s for that. I could of written an image to usb key and installed from that, but I didn’t have any with me.

So I decided to try what Mark Cox; did and try to boot it from my phone. I more or less just followed the steps he mentioned, though I had to get some 3rd party software to expose the storage card as a usb device.

But that aside, it worked. Not the fastest way to boot, but it got the live image running so I could do a hard drive install.  Kind of cool. Wonder if there is anyway to support i386/x86_64 live images on the same card?

gum

I posted a small script I use to help manage the git repo’s of func to github. It’s named gum[1].

The basic idea is you include a gum.conf config file in your repo, that defines where you can find all of the repo’s and branches of the project in question. It’s got a couple of commands to add list the repo’s, add a repo, or add all of the repo’s. It always names the branch in the form remotename-branchname.

I wrote it since it seemed I would end up with a different version of the git repo on every machine I used, and I got tired of tracking down remote and branch names to add them to each src checkout I was using.

[1] mainly to annoy skvidal ;->

reading is hard

I read a lot of mailing lists. Mostly for various open source software projects. Most of them for work.

It would be cool to have a mailing list summary page. The page would scan the mailing lists, and post the content most likely to need attention. For software projects, this is stuff like:

  • Patches (http://ozlabs.org/~jk/projects/patchwork/ does this for patches to some degree)
  • urls to bug reports
  • urls to pastebin  or gists sites that are likely to contain errors or patches
  • things that look like error messages (segfaults, stack traces, etc)
  • links to SCM (either direct urls, or urls to web interfaces, github, bitbucket, etc)

Mailing list archive software could probably do this. Mailman has support for “topics” that are defined by regex’s. But the interface is poor.

And of course, an RSS feed for all of the above would be nice.

shell history meme

Just thought this was kind of interesting.

work machine, user
[alikins@grimlock ~]$ history|awk ‘{a[$2]++ } END{for(i in a){print a[i] ” ” i}}’|sort -nr|head
283 git
259 cd
173 ls
69 vim
36 su
19 cat
12 git-branch
11 man
10 cp
9 grep

work machine, root
[root@grimlock alikins]# history|awk ‘{a[$2]++ } END{for(i in a){print a[i] ” ” i}}’|sort -nr|head
123 make
109 rpm
87 ls
81 certmaster-ca
78 vim
76 func
64 cd
53 cat
44 yum
37 /etc/init.d/funcd

conFUD

The main day of the fudCON talks were today. Seemed to go pretty well. I pitched two sessions, one on OLPCs/Asus EEEs/ultraportables, and another on func.

The OLPC session was more of a meetup/get together than a talk, and seemed to go pretty well. Unfortunately, it got scheduled against the Fedora.tv/Vaniv/Percolote talk, so I missed that.

My real talk was func, and the talk seemed to go well. I tried to keep the slides pretty slim and lightweight, and breezed though them pretty fast, but I think it went okay. I didn’t seem to get any of the vaguely aggressive questions in the Q&A these sort of talks usually get, so I’ll take that as a win.

Fudcon

I’ll be at FudCon this weekend. What is FUDcon? It’s like a BarCamp but for Fedora nerds.

I’ll be helping with the presentation on Func. I’m writing the slides at the moment. Yay! Slides! If there is anything someone wants me to include (photo, reference, curseword, etc) let me know and I’ll see what I can sneak in. My slide presentation philosophy is “leave them confused”.

You may also know me from other slides and hackfests like cobbler, pulp, olpc, eee, vidpress, and wknc.