May 3, 2012
January 31, 2012
Auto-update bind 9 zone database serial numbers
This post is helpful for configuring emacs to automatically update the “Serial” in bind zone databases. I wanted to do the same in Vim, but the solutions in the comments of that post didn’t work for me. Here’s a version that does. It’s yours for free under the Affero GPL v3 (or any later version, at your preference):
function s:BindZoneSettings() function s:UpdateBindZoneSerial(date, num) if (strftime("%Y%m%d") == a:date) return a:date . a:num+1 endif return strftime("%Y%m%d") . '01' endfunction function s:ReplaceBindZoneSerialLine() :%s/\(2[0-9]\{7}\)\([0-9]\{2}\)\(\s*;\s*Serial\)/\=UpdateBindZoneSerial(submatch(1), submatch(2)) . submatch(3)/g endfunction autocmd BufWritePre /etc/bind/db.* call ReplaceBindZoneSerialLine() endfunction
October 5, 2011
Link Checker Wishlist
Link checkers spider through your website and make sure that links work. I want an awesome link checker. Ideally, it would espouse as many of these attributes as possible:
- easy to learn
- easy to configure/customize
- example config: don’t hit URLs on other servers
- sensible default behaviors
- example: respects robots.txt and ‘nofollow’ link attributes
- scriptable / embeddable
- useful from command line
- useful from within CI servers like Jenkins
- recurses (parses HTML, follows links)
- and smartly avoids checking the same pages twice
- fast
- thrifty with memory
- pluggable
- example plugin: run jslint on all JavaScript
- example plugin: validate HTML 5
- example plugin: validate CSS
- example plugin: compute accessibility score
- example plugin: JUnit XML output
- example plugin: OpenDocument spreadsheet output
- example plugin: Excel output
- example plugin: CSV output
- example plugin: JavaScript engine
- example plugin: follow hashbang URLs
- beautiful source code
- FLOSS
October 5, 2010
Mifos opportunity: i18n
We need help with i18n (and support of L10n) in Mifos. Are you interested in becoming the Mifos i18n champion? It’s a great volunteer opportunity! The work should be intermittent, and basically at your leisure. One of the really fun parts is working with the folks at Translatewiki.net… they added a bunch of messages from our “questionnaire” module, and after a few days it was completely translated to Interlingua, Macedonian, Dutch, Norwegian, and Finnish! There’s an army of talented translators ready to help.
Here are some example tasks for the i18n champion:
- Make sure messages in Mifos are translatable.
- Document messages and resolve issues mentioned on our Translator Helpdesk.
- Hang out in #mediawiki-i18n (an IRC channel on Freenode), answer Mifos questions when they come up, or add them to the Translator Helpdesk.
- Work on specific i18n issues: MIFOS-3859, MIFOS-3821, MIFOS-2018 and others.
- Improve and refine the Mifos i18n/L10n guide.
See also: #Mifos, #microfinancing and #Wikimedia
Update
A day after I sent out this call for help we got two volunteers! Thank you, Stanley Kwok and Jasmine Sandhu!
September 13, 2010
Mifos Manual as an ebook
I learned about ebooks last week. Very cool! I’ve found them much more readable than PDFs or Web pages. Maybe it’s the ebook readers… they sure help me focus on the content.
Since we used FLOSS Manuals to write our manual, it’s easy to generate an ebook using Objavi. Here’s the Mifos Manual as an ebook. Looks pretty good on the iPhone (lately I’ve been using “Stanza”). Probably looks even better on a Nook, Kindle, or iPad.
August 21, 2010
Lazy Programmer Automates Christmas Gift Exchange
Every year my family does a gift exchange. Names are chosen out of a hat to randomly assign pairs. Certain rules are followed:
- give to a different person than last year
- partners can’t be nuclear family members (or bf/gf/so/etc.)
- can’t choose yourself
- participants give one gift only
- participants receive one gift only
I decided to give it the old college try in Python. Drawing names following the rules certainly posed more of a challenge than I anticipated! But I think I figured it out. At least, I figured out the “lazy programmer” way to solve it, not the statistician/np-complete/combinatorial/elegant mathy way to solve it.
(more…)
June 28, 2010
FLOSS technical/dev summits: why? how? with Tarus Balog of OpenNMS
Tarus Balog is the CEO of the OpenNMS Group, a company which funds the development of OpenNMS: FLOSS enterprise network monitoring software. OpenNMS lets you know when your machines go down, among other things. I use OpenNMS at work to keep Mifos infrastructure up and running: build servers, cloud, databases, etc.
Our corner of the Grameen Foundation focusing on Technology for Microfinance has a lot to learn from OpenNMS! They’re also FLOSS, and they’re profitable.
I talked with Tarus the other day. Turns out he’s a really cool guy. I’ve been following his blog closely for quite a while now, so I was thrilled with the chance to pick his brain. The point of the call was to find out why and how they run their developer summits: in-person meetings where coding, alignment, teambuilding and planning are plentiful. OpenNMS hosts these yearly, and we’d like to do them for Mifos.
April 24, 2010
Grails: alternate views for mobile (iPhone) clients
I figured out a semi-cool setup to provide alternate views if the client is found to be, for instance, a Mobile Safari browser on an iPhone. I wanted to share my findings since I’ve seen related questions asked here or there, and I have a question at the end about a potential improvement.
First, I made a filter:
detectMobile (controller:'*', action:'*') { before = { if (request.getHeader('user-agent') =~ /(?i)iphone/) { request['isMobile'] = true } else { request['isMobile'] = false } return true // keep processing other filters and the action } after = { } afterView = { } }
Next, I added the following to a controller:
def afterInterceptor = { model, modelAndView -> if (request['isMobile']) { modelAndView.viewName = modelAndView.viewName + "_m" } }
For that controller, if a request comes in from a mobile device, a view ending in “_m” is loaded, instead of the default view. The view “list.gsp” would have a counterpart mobile view “list_m.gsp”, and that’s what would be served to iPhone clients. That’s it, so far.
One bit that would be handy would be to add this closure to every controller, rather than have to copy and paste it to controllers that support mobile views. I’ve been meaning to see how the rest plugin dynamically adds methods to every controller in case that is similar to what I’m trying to do, but if anyone knows offhand what I need to do (or read) to automatically get the closure in every controller, please let me know.
April 14, 2010
The Power of Lightweight Markups: Presentations
Are you busy clicking away at a slide deck for your next presentation? Want to try something a little different?
Non-nerdy folks following this blog, you’ll probably want to tune out now. Or not! I tried to write this for a wide audience, so come on down the rabbit hole if you dare.
April 1, 2010
The Mifos user manual sprint; how we’ll break Brooks’s law
I’m really excited for the Mifos user manual sprint tomorrow. We’re using FLOSS Manuals to write our new user manual. FLOSS Manuals is an exciting way to write a book, it provides a framework for high-bandwidth collaboration, publishing to HTML and print, translating, and more. There are many examples of small teams (less than 10 people) publishing large, excellent books in short time periods (less than a week).
We’ll have a video feed going. I’ll be wearing my track suit.
Check out our coordination wiki page and stop by our IRC channel if you’d like to join in! If you’ve ever edited text on a wiki, are brave enough to learn how, or just want to see me in a track suit, come on by.
I suppose I should explain the title of this post. If we can establish a framework for software development on Mifos like we’re running this sprint, we can break Brooks’s law. Why not? The Ksplice folks did it, so we can too!
