tarashish dot com

< Insert something witty here. >

Porting Oppia to Django

| Comments

For those who are wondering what oppia is,

Oppia is a web-based tool for creating interactive online activities that enable students to learn by doing. Oppia aims to capture and generalize the one-on-one “conversations” that a student has with a teacher, so that other students can benefit from them.

Currently, oppia is written using webapp2 and runs on Google App Engine only. The goal is to port it to django, so that it can run on more number of platforms and hopefully be used for training missions at openhatch

GSOC 2013 Is On

| Comments

Google Summer of Code is happening this year too, thanks to Google. For those who don’t know what Google Summer of Code (GSOC) is:

Google Summer of Code is a global program that offers students stipends to write code for open source projects. We have worked with the open source community to identify and fund exciting projects for the upcoming summer.

Google has already announced the list of accepted organizations. You can find the list here. There are a total of 177 organizations participating this year including the biggies like Mozilla, Apache, KDE, GNOME, PSF, Fedora etc.

I’m applying as a student to be part of GSOC this summer. Wish me luck :)

Fixing ‘Mkmf’ Load Error in Ubuntu

| Comments

After a while I sat down to set up my Ruby environment on my new ubuntu laptop for octopress. I haven’t blogged for a few months. And I haven’t really needed ruby in a few months either. So for octopress I had to set up rvm, rake and all the ruby gems. But while installing RedCloth gem (RedCloth gem is needed for markup processing in Octopress) I encountered this error.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Fetching gem metadata from http://rubygems.org/.......
Fetching gem metadata from http://rubygems.org/..
Using rake (0.9.2.2) 
Installing RedCloth (4.2.9) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /usr/bin/ruby1.9.1 extconf.rb 
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
  from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
  from extconf.rb:1:in `<main>'

Gem files will remain installed in /var/lib/gems/1.9.1/gems/RedCloth-4.2.9 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/RedCloth-4.2.9/ext/redcloth_scan/gem_make.out
An error occurred while installing RedCloth (4.2.9), and Bundler cannot continue.
Make sure that `gem install RedCloth -v '4.2.9'` succeeds before bundling.

First Step Into the Open Source World

| Comments

I have been wanting to contribute open source projects for quite some time. Contributing to existing open source projects is quite different from working on small projects of your own. I think the main problem I faced was the size of the repositories. The amount of code already there was always overwhelming. So I never went too far.

But now I have some good news to share. I have finally become a part (however small that is) of the open source movement. I have started contributing to MoinMoin. As mentioned in their bitbucket repository

MoinMoin is an easy to use, full-featured and extensible wiki software package written in Python. It can fulfill a wide range of roles, such as a personal notes organizer deployed on a laptop or home web server, a company knowledge base deployed on an intranet, or an Internet server open to individuals sharing the same interests, goals or projects.

Solving Antialiasing Bug in Chrome

| Comments

Yesterday while making a small cute sticky note chrome extension, I faced an antialiasing bug in chrome. The bug nearly drove me out of my mind :)

So to save some headaches in future, I am writing down the possible solution here, so that me or anyone else who faces this issue in future will hopefully find this post and the solution will hopefully work. Another thing I’m hopeful about is that the future release, chrome will kick this issue out for good. :D

So first up, here’s a snapshot of the issue. chrome bug

Installing Sublime Text 2 on Ubuntu 12.04

| Comments

Update: Installing through ppa is much cleaner and easier. Just follow the instructions

Sublime Text 2 is the most awesome text editor I have used so far (even better than Textmate I think). If you have never heard of it you should surely check it out .

This post is to guide people (that include myself) how to install and integrate sublime text 2 with unity user interface of ubuntu 12.04. While there are installers of sublime text available for windows and OS X , ubuntu does not have one. So some tweaks are needed to integrate sublime text into unity.

Step 1 - Download the tar archive from sublime text’s download section. Extract the file using the GUI archive manager or the command

1
tar xf Sublime\ Text\ 2\ Build\ 2181\ x64.tar.bz2

A Visit to Nandankanan

| Comments

Recently I visited Nandankanan, a zoo near Bhubaneswar with friends :) . The zoo is mostly famous for the white tigers among other things. Mostly it was a memorable but somewhat disappointing outing.

The numbers of the animals on display was disappointing . We could see like 2 tigers , a lion-lioness pair , a zebra , a giraffe .There was no Orangutan , no bear . Most cages (or whatever I should call them) were empty. Disappointing . I was expecting more numbers of tigers at least. Anyway perhaps our timing was wrong or something. There was a chimpanzee. But I couldn’t see it because of some people yelling at it.(Yes. there WAS a BIG RED SIGN saying “SILENCE PLEASE” and those people seemed literate enough to read and understand it.) The chimp never got out of its hiding. That was the biggest disappointment of all. :( And yeah the zoo restaurant was closed too.

On the better side we saw a white tiger. The birds and reptile sections had a good variety of creatures. And above all I learned how to use my camera properly and had a great time with friends :). Here are some photographs we took.

zoo pic 5

Web Scraping With Python

| Comments

For those who have no idea what web scraping is

Web scraping (also called web harvesting or web data extraction) is a computer software technique of extracting information from websites.

The web is full of information. Generally we are happy enough to browse these information with our favorite web-browser. There are times, however, when we need to collect information from some site and manually browsing the site is not an option. Web scraping comes in handy in those situations. You build a program which access the information you need without opening the page in a web browser.

Making Text Inputs Look Awesome Using CSS3

| Comments

I often use this snippet of CSS to style text inputs and even search inputs. I just love the look of it. So this blog post is just to keep it within reach.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
input {
    border: 5px solid white;
    -webkit-box-shadow:
      inset 0 0 8px  rgba(0,0,0,0.1),
            0 0 16px rgba(0,0,0,0.1);
    -moz-box-shadow:
      inset 0 0 8px  rgba(0,0,0,0.1),
            0 0 16px rgba(0,0,0,0.1);
    box-shadow:
      inset 0 0 8px  rgba(0,0,0,0.1),
            0 0 16px rgba(0,0,0,0.1);
    padding: 15px;
    background: rgba(255,255,255,0.5);
    margin: 0 0 10px 0;
}

Tweeting From Python.

| Comments

Many times I have the urge to check twitter while at the terminal doing stuff I love (mostly python ). But I am too lazy to open up the browser and go to twitter.com . So I decided to see how can do all the tweeting stuff from the terminal itself using python. And it turned out to be fairly simple.

So first I needed a twitter library in python to keep things simple. So I googled around a bit and tweepy seemed to be a very good choice. So I read the docs and fired up Geany to write some scripts.

First thing I learned reading all the docs is that Twitter uses something called OAuth to authenticate an application before it can access any user’s account. It is safer than the older simple authentication methods. Say some application X wants to tweet for you. The X has to log into your account to do so. In older authentication system the user used to provide his password to the application while authorizing it. But now the OAuth authentication system provides the application a access token through which it can access the user’s account after authentication. So it’s more secure.