Compiling VIM

Linux Tips vim

Running ubuntu 10.10 here and ubuntu repos have only vim 7.2. I’m sure there’s a ppa out there that has 7.3, but thought that compiling vim from source would be a good exercise - plus I get to compile it with the options that I’d like rather than relying on someone’s build. Here’s the options that I enabled: CONF_OPT_PERL = --enable-perlinterp=dynamic CONF_OPT_PYTHON = --enable-pythoninterp CONF_OPT_RUBY = --enable-rubyinterp CONF_OPT_GUI = --enable-gui=gtk2 CONF_OPT_FEAT = --with-features=huge BINDIR = /usr/bin DATADIR = /usr/share Here’s hte other dependencies I had to install

Read more →

So now I’m in Vim land and this is the first time I’ve gotten far enough to feel a bit comfy. Decided to dust off my blog and start at it again - what better to do it in than in VIM. So - TA-DA - here’s the first post - courtsey VIM on ubuntu. However, as usual, it was rougher than it’s supposed to be. IN any case, I’ll forget how I got this far the next time so the next few posts will be around recording how to get VIM to post to WP.

Read more →

Have been having all sorts of weird problems with Nandroid backup/restores. Essentially, here’s the symptoms of the problem - I’d get a nandroid and restore it successfully (Amon RA/CWM would report success) - however either will get stuck at boot or if it boots successfully, will have tons of FCs and/or data loss. In most cases, I would dread seeing the green Android on boot up asking me to log in to my google account :(

Read more →

Force stop market and clear data Launch market again - it will ask you to accept terms. Do so. Should force it to rebuild the database and you should see all your apps linked to market again.

Read more →

nandroid backup - amon ra recovery Reboot recovery, install zip Install Link2SD-preinstall.zip (only on cyanogen based ROMs) Boot Play around…​make sure things work. Install other niceties/Troubleshoot Link2SD - database error.Just uninstall and reinstall. /etc/gps.conf - change to sg.pool.ntp.org Charge to 100% Reboot into recovery wipe battery stats

Read more →

Back after a long time…saw something strange today and think it deserves a post. I was cranking through Problem 47 on Project Euler. As I was optimizing the solution, the optimization actually increased run time – and I’m at a loss to explain it. So here goes: def problem_47(maxlen = 4): found = False i = 2*3*5*7 + 1 while not found: # facs = [len([j for j in uniq(prime_fac(i+k))]) for k in xrange(0,maxlen)] d = 4 for t in range(i+3, i-1 , -1): k = len(list(uniq(prime_fac(t)))) if k < 4: i = t + 1 break else: d -= 1 if d ==0: found = True print list(xrange(i, i + maxlen)) # if i % 1000 == 0: # print i The run time is about 1m2s.

Read more →

Was in need of a utility function that can retry an arbitrary function a few times before giving up. Essentially something like Gmail or Google Readers behavior when there’s no network connection. Thought it would be a few minutes job to cook up a decorator utility in Python. Boy! was I wrong! I mean, the basic use case is definitely trivially easy with Python – however, once you want something that’s more useful than that and resembles something that you’d actually use in production, the complexity goes over the top!

Read more →

Obviously, I’m not writing enough out here… part of the reason being even though wordpress’s web editor is great, I really like not having to type gobs of text in a text area. So eventually, looked around and found Windows Live Writer. Its going out on its customary spin :). So what’s been cooking? Actually a bunch of things over the last several months: Stuff – on which I mean to put up individual posts

Read more →

Firstly - my VM setup: I’m running Virtualbox with Xubuntu 9.10 on Win7 host - and its pretty. Its on a office standard issue Dell D531 - meaning they’re AMD Turion X2 TL-60 and 2GB of RAM. Now the Turion’s supposed to have hw virtualization (AMD-V) however, the moment hw virtualization was enabled in virtualbox and I tried starting the vm, the machine would hard reboot!!! After searching high and low, turns out that its an issue with Dell bioses and they dont have any updates.

Read more →

Just started using Hudson recently and I’m wowed! It’s head and shoulders above CruiseControl and things that I like a lot are Snappy web based config - felt great that I could set up a CI build with essentially the repo path alone Plugin system! Deep maven2 integration (though read on below that this isnt always what works) Trending data OOB - essentially giving you nice charts about how your build is doing over time

Read more →