April 2012
1 post
My Current Zsh Theme
So, recently I began using the Zsh for the first time and surprisingly the switch from Bash to the Zsh has been pretty smooth. I discovered an awesome community driven framework, oh-my-zsh, that helps in managing your zsh configurations. I was playing with one particular theme called pygmalion and it looked pretty neat. It utilized the git features when you add git as one of the plugins. If the...
Apr 17th
March 2012
1 post
Instagram Engineering: What Powers Instagram:... →
instagram-engineering: One of the questions we always get asked at meet-ups and conversations with other engineers is, “what’s your stack?” We thought it would be fun to give a sense of all the systems that power Instagram, at a high-level; you can look forward to more in-depth descriptions of some of these systems in…
Mar 21st
1,344 notes
January 2012
1 post
3 tags
This
Stand alone, make your way Through these dead carcasses. There’s a fog that’s coming to get You and you fall awake.  You’re back into this..face your demons now Mara laughs at your futile tries You give in to your other side. Craving this and wanting that you quiver like fish out of water and you take a step back into this  Face your demons now  You’re back into...
Jan 15th
10 notes
October 2011
1 post
Postgres ident error
Today I had this particular error. psql: FATAL:  Ident authentication failed for user “postgres”. When i tried to run django’s sqlcreatedb | psql -U postgres. To solve this i had to go to the pg_hba.conf file located in postgres directory and put trust instead of ident in the file. local   all         postgres                          trust local   all         postgres      ...
Oct 21st
September 2011
2 posts
Resizing a column in Postgres.
I was using hakanw’s django-email-usernames, to enable users to login with their email addresses as well. It was working great but it had only one issue. Django sets the character limit to 30 characters or less, for usernames. django-email-usernames does give the users the option to extend the username column when doing a fresh syncdb. But their sql command was not working for me for some...
Sep 14th
PostGIS Error when saving coordinates in...
I was having this error “An Error while transforming the geometry to the SRID of geometry form field”, everytime i saved a Location’s coordinates using the django-admin. I was using PostGIS and postgres and I had already followed django’s awesome installations instruction on installing geodjango. I also had another instance of the server running with the same configurations...
Sep 13th
August 2011
1 post
3 tags
Django pop-up Multiple Checkbox form using...
I recently had the chance to play with colorbox, which is a lightweight customizable lightbox plugin for jQuery. I needed my django form to be a pop up and I did not want to change a lot of stuff I had already written. Here are some of my notes on how i got it to work . My form was working perfectly, all i needed to do now was to make it a pop up and handle all the errors and success page in the...
Aug 16th
June 2011
3 posts
South Migration Issue. Relation already exists...
I was having this issue today where I was trying to migrate my database changes but it kept giving me this error DatabaseError: column ‘Enter Column Name Here ‘of relation ‘Enter Relation Name here’  already exists. Everytime I did ./manage.py migrate app it would give me the same error. I tried doing ./manage.py  migrate —list to see the list of migrations and it...
Jun 24th
3 tags
Uploading Images and files in django forms.
If you want to upload an image in a django model form, all you need is a ImageField in your django model. ImageField inherits all attributes and methods from FileField but also validates that the uploaded object is a valid image. Next thing you need is to specify where the image is supposed to be uploaded. This is done via the upload_to option to tell django which subdirectory of MEDIA_ROOT...
Jun 12th
3 tags
PostgreSql database dropping issue
I was involved in a case today where I had to drop a Postgresql database using the command dropdb -U database_user database but it was giving me this error,  dropdb: database removal failed: ERROR:  database “Enter Database Name Here” is being accessed by other users. Intially, I thought it was because i was using ipython to access the database by making some django querries, but...
Jun 8th
10 notes
May 2011
2 posts
1 tag
“In a controversy the instant we feel anger we have already ceased striving for...”
– Buddha http://www.brainyquote.com/quotes/authors/b/buddha.html
May 15th
3 tags
The need for Parallel Programming
This is the technical report I wrote in my Technical writing class in 2009 at Louisiana Tech. I was going through my old blogs and found this so, thought i would migrate it here. INTRODUCTION In this report I have examined how Multi-core computers are emerging as a new wave of technology and how implementation of parallel running applications can better utilize the multi-core resources. I...
May 11th
19 notes
April 2011
1 post
1 tag
Setting up external monitor as the primary monitor...
I had recently purchased a Lenovo y560p laptop which had an ati graphics card. Anyone who has used ati graphics card along with ubuntu knows that third party drivers for the ati, does not work very well out of the box for Ubuntu. So, at first I tried to search for my third party Ati drivers in the additional drivers section in Ubuntu. I am ,as of now ,using Ubuntu 10.10, which only has drivers for...
Apr 26th
1 note
March 2011
4 posts
Overriding Twitter's Default Callback Url using...
Unlike Facebook, Twitter does not let you specifiy your callback url when you are initiating Twitter’s Oauth procedure. The default Callback Url is the one specified when you registered your application here https://dev.twitter.com/apps/new . If you wanted to change your callback url, you would have to manually log in to your app settings in https://dev.twitter.com/apps and edit them. This...
Mar 30th
Twitter Connect in django using Oauth
I was recently involved in a django project where I had the opportunity to learn Oauth2.0. Almost all new social networking sites have started using Oauth2.0 in favour of basic authentication which was the prevalent authentication system sometime ago. Twitter has not yet migrated to using Oauth2.0, it is using Oauth1.0a as of now. I am specifically going to write about how I integrated twitter...
Mar 29th
3 tags
Pasting in VIM
Sometimes I need to paste something to my code in VIM. Needless to say if you don’t know how to use the paste functionality properly in vim, it pretty much screws the indentation of the copied text. That’s when :set paste comes in. When you want to paste to your file, just enable set and paste, the indentation will remain intact. If you are like me and do not want to type :set paste...
Mar 25th
11 notes
1 tag
Git: Merging a single file from one branch to...
Today I had a case where I had to merge a single file from our master branch to our experimental branch. I did not want to merge these two branches for I just wanted to merge the changes in a single file in my master to the file in my experimental branch.  Turns out git has a clean method of doing just that. git checkout master <path to the file you want to merge> // ]] // ]]]]>]]>
Mar 17th