Author: nigelb

  • Quick SOCKS proxying with ssh

    Quick SOCKS proxying with ssh

    This is mostly relevant for *nix users. OpenSSH has a feature that lets you setup a SOCKS proxy pretty easily. This helps work around blocked sites without too much setup overhead.

    Here’s what you do.

    ssh -ND 10000 user@myserver.com 

    The -D flag specifies the local port that will be forwarded to the remote server. The -N flag makes sure that after the connection is made, no remote command is executed.

    Now, open Firefox -> Preferences -> Advanced -> Network -> Settings. Select the “Manual proxy settings” option and enter localhost into SOCKS Host and 10000 into Port. Press OK. Now when you browse the internet on this instance of Firefox, the traffic should be routed through the server.

    I’ve used if often to get around blocks and especially to get around local routing issues.

    Remember, if your ssh connection breaks, your can’t visit any websites until you re-establish the connection. After you’re done, set the proxy settings back to the default (“Use System Proxy Settings”).

  • Remembering Michael

    Remembering Michael

    Michael Bauer, a good friend and a colleague at Open Knowledge for nearly 2 years passed away a month ago. I’m still finding it hard to process that he’s passed away. He’d congratulated me on my run just the day before. And this is the final tweet from his Twitter account.

    I met Michael for the first time in winter of 2013. It was my first summit after starting at Open Knowledge. Michael, Friedrich, Lucy, Tryggvi, I, and a few others were holed up in Rufus’ kitchen getting briefed on Openspending from Friedrich. Over the years, we’ve worked together to deliver trainings and we met each other at the Open Knowledge summits and events. I sat through one of Michael’s trainings last year in Tanzania on cleaning data. I learned quite a lot about cleaning up data from him that day. He got the entire room comfortable about learning new things. I could see their joy in understanding how to use the right tools.

    Michael, during the training in Tanzania

    After Michael left Open Knowledge, we kept in touch on #running on irc.freenode.net and Twitter. I’d just started running this year and he encouraged me to do longer distances. As I continue running, I’ll surely be thinking of Michael every day.

    At the last summit we both attended in Cambridge, Michael had brought Pink sunglasses and he coaxed me into having this hilarious picture taken. I miss Michael’s infectious energy and silliness.

    Me with Michael's Pink sun glasses
  • Half Plus Half Equals One?

    Half Plus Half Equals One?

    Does two Half Marathons count as one full marathon? I don’t know, but I had a chance to find out at the recently concluded Double Whammy event.

    When I first signed up for the event, I registered for back-to-back 10Ks. I’ve done 10Ks before and I’ve done half marathons before. I figured 10K would be easy and doable. Later, I talked to Souvik and I realized 10K isn’t really a challenge. I know I can do two back-to-back 10Ks, I wanted to do something that was more challenging – so I asked to be upgraded to back-to-back half marathons. Later when I realized that it was not only challenging, it was also a little beyond the edge of craziness.

    Day 1

    The race start time was 5:30 am, which meant I had to wake up at least as early as 3:30 am to grab a snack and then head over to the start line which is a good 20 km away from home. The drive was a long one and after I got there, there was about a 1 km walk to the start line from the parking area. Once I reached the start line though, there was the cackling of nervous laughter and familiar faces. It was quite dark when we started and I maintained my pace with the other racers, incredibly enough, without noticing how fast I was going. I later learned that I was going speeding too fast. I didn’t want to slow down too much and be the last one, so I kept at it. Eventually, I slowed down to what felt comfortable (Again, I later learned this was faster than normal for me).

    The first day’s course course was tough, and we knew it. I’ve run on GFR in the past, I remember there being barely any shade, so I was ready with sunglasses and a cap. As an out and back race, I dreaded every descent, I knew I’d be climbing those back up on the way back. I didn’t really have a pacing strategy in mind, but it so worked out that I only took walking breaks at aid stations and at the big incline on the way back. That one was tough to run and I didn’t see any point in running it up. I just leveraged my long legs and took long steps up.

    Let’s Run Gurgaon events have been very well organized. We had a reasonable number of aid stations and the best thing they stocked was the 5 Star bars. They probably gave me a bigger boost of energy than anything else 😀

    Once I finished the run, I realized how long the 1km from the starting point to the parking area was. Never before has 1 km felt that long. I’m still unsure how I managed to ride my bike all the way back. My leg muscles hurt and there was nothing I could do about it. Most of Saturday was spent recovering (read: sleeping, eating, and drinking water).

    Day 2

    The second day’s start point was near TERI. It wasn’t too hard to locate given I ran through the road the previous day. When I got there, a crowd of tired, but excited runners who were all in various amounts of fatigue and pain greeted me. It was supposedly a more flat terrain on Day 2 compared to Day 1, but it was no walk in the park. Until the half way mark I managed fine, after that the muscle soreness hit me. I had to do a run-walk until the last aid station. With about 6 km to go, my phone died stopped giving me pace alerts. I remember charging my phone but when I got to the start line, it only had 30{13371f13f0bf161e7595c2ac5df92e005bed3de1d132ef646d0a44f3a1a9ee62} battery. I brought a battery pack but not a charging cable 🙁 After the last aid station, I walked pretty much the rest of the route until the last 500 m or so.

    The runner’s high from crossing the finish line was pure bliss. And I can’t remember how I found enough energy to laugh at all the silliness we were all doing. There was someone talking very seriously about Krav Maga and he tried to demonstrate, but all he managed was spill someone’s drink 🙂

    And another thing

    The most surprising part about doing this race was that, after the second day, I had some body pain, but not quite a lot of it. I did a recovery run on Tuesday and I was totally fine afterward.

    During the bib collection, there was a gait analysis and correction workshop by Dr. Rajat. He confirmed what I suspected all this while – I heel-strike. He suggested a simple activity to fix it that I’ve found massively useful – Skip in place for about 5 minutes before the run. You can’t actually land on your heels when you skip, you’ll always land mid-foot. This will create a muscle memory that’ll be carried into the run. Additionally, it’s also a great pre-race warm up.

    The disadvantage of back-to-back races is that, well, you need to wake up early on back-to-back days. This is not fun, despite me being a morning person. I had nightmares during the week of the race about waking up too late. This may have something to do with my first run on GFR. I woke up early, snoozed, and eventually started running at 6:30 or so. I didn’t bring my cap or sun glasses that day and got completely exhausted thanks to the heat.

    The good part though is you get to run the full marathon distance with some rest, skip the sunnier parts of the day, and get some time in between to sleep and rejuvenate.

    This race weekend is officially my week with the highest mileage – 45 km. I can’t wait to beat it in a few months 😀 I managed to set a half marathon PR on the first day of 2:28:50. The second day saw a huge drop in my speed thanks to all the walking to 2:50:19. I’m in disbelief about maintaining a 7:03 min/km pace throughout the first day. With AHDM around the corner, I’m curious to see how well I can do in terms of pace. Next year is already close and I’m working on planning which races I want to run 🙂

    Oh, and Double Whammy Spring 2016 has already been announced and tickets are open. This time I’m wondering if I should run the 42+42 or improve my 21+21 timing.

    Not going to forget this medal for some time

  • Mailman Subscription Spam

    In the last few weeks, a few of us running mailman have been noticing attacks using our servers. Most often we end up being used as relays to send subscription spam to the servers. They pick one address and use multiple aliases of the address to send spam to. I won’t get into the details of the attack, but here’s a script that I came up with and is now modified to be friendly thanks to OpenStack Infra Team.

    Create the file /usr/lib/mailman/bin/ban.py with this content:

    def ban(m, address):     try:         m.Lock()         if address not in m.ban_list:             m.ban_list.append(address)         m.Save()     finally:         m.Unlock() 

    Now run this script like this

    sudo /usr/lib/mailman/bin/withlist -a -r ban "<address to ban>" 

    The ban address can be a regular expressions, so to ban an address and all suffixes, use ^address.*@example.com as the address to ban.

    Update: Matthew Saltzman pointed out that the . in .com needs to be escaped as well.

  • First Half Marathon

    First Half Marathon

    The Plan

    On June 8th, I started prepping for my first half marathon. Quite ceremonially, I skipped the first workout – stretching and strengthening exercises for 20 minutes. Over the next 9 weeks, I skipped a few days and once a full week, but managed to vaguely stick to the plan. I was already running 10Ks at that point quite easily, and I used the plan to make sure I didn’t overexercise and stuck to some sort of sane schedule. I used the Hal Higdon’s Novice 1 plan. It had the right mix of continuity and long runs. I modified it a bit to squeeze it into 9 weeks rather than the original 12 weeks. I think I’ll be continuing my training for a while in the same pattern – Stretching and strengthening on Monday, 3 days of training runs on Tuesday, Wednesday (recovery), and Thursday; cross training on Saturday (cough which I never did), and a long run on Sunday.

    The Running Plan

    Last year, I ran my second 5K in 39 minutes and I remember thinking about the folks running the 10K. I thought it was far too long and difficult to achieve. On Sunday, I finished my first half marathon in 2:46:28. It’s been a long journey to get here and I honestly probably wouldn’t have been as consistent if it weren’t for being around Souvik, Bhavya and Sumit. We’ve done quite a lot of long runs that end up in Cafe Lota.

    The Run

    Every time I’ve raced, I set a new “This is the toughest run ever” record. This race will truly be memorable for the next several months. We started off with a good deal of humidity. I took about a kilometre before I was ready to start running. The first challenge came at 3 km mark or so, where we had to cross a “small pool of water”.

    At some point, it became an obstacle course

    A little after that point, we entered the cross-country part of the route. It was mostly uphill and kind of difficult. My clothes were completely drenched in sweat. Just when I reached the highest point in the run and started going downhill, it started raining.

    It started as a slow drizzle. I felt like I walked into a shower and out of it the first time. And then it hit. The rain was incredibly refreshing and my pace increased for a while. The only problem was the route. The already muddy trail became slightly more challenging. It felt like I was running on cheesecake. Every step was unstable on some stretches. The next 7KM or so was on roads. This stretch was tricky. The rain kept going and there were large puddles of water. Initially, I tried to avoid the puddles. Later on, I just went through them. My shoes were wet anyway and there was not much I could do by avoiding them.

    Nearly at the finish with Shivang

    I made friends with Shivang from when the rain started. We were running at about the same pace from then on. He made sure I didn’t run too fast or give up. At one point when he was giving up, I encouraged him to just keep going. Once we crossed the final turn and the finish line was kind of visible, I went all out (I think I actually beat someone at the finish line).

    I couldn’t walk very well or climb stairs the rest of the day. Today, I finally ventured out for a run and it seemed okay. Can’t wait to do it again next month at the Dwarka Half Marathon.

    After the finish :)