ArvinderKang.com header image 1

A simple shell trick

August 20th, 2008 by { Arvinder Kang } · No Comments · Programming

Here is shell a trick that I used lately.

Before moving to new system (where I enforce quotas on all home folders), I had portable home directories for all the users on my shared server storage. The old setup did not strictly apply the quota limits on all users. Some of the users had large home folders and a couple of them logging on different systems, would fill up the whole hard disk on that system.

Two find how much space each user was using on the server, I ran the following command in their home directory.

$ du -chd -1 > $HOME/user_space_report.txt

Simple.

→ No CommentsTags:··

An eventful week

August 16th, 2008 by { Arvinder Kang } · 1 Comment · Random

Memphis Gurudwara

Last week was pretty eventful. On Sunday, I invited my friend Stephen Goforth and his son John to visit the Memphis gurudwara. John is majoring in Music at the University of South Alabama. He is already composing and writing music, although he still is a freshman at the University. Check his song Tunnel no light here. We talked a lot about western and Indian music and that how fusion music has revived a lot of lost music of past ages.

Gurudwara

On the way back we visited Sun Studio in Memphis. It was here, where Elvis Presley recorded his first record at the age of 18. Artists like Jerry Lee Lewis, Carl Perkins, Johny Cash and B B King have been linked to this studio over the years.

Sun Studio

During rest of the week I worked with engineers from Apple to setup a new XSAN in our Lab.

On thursday, we invited John and Roberto, the guys from Apple, for a get-together at a local pub, Blind Pig. The night turned into a nice little office social and our guests seemed to be pretty impressed with the hospitality and the “awesomeness” that Oxford had to offer.:)

Friday was a long day. The engineers left and I worked on rebuilding the workflow, imaging the systems and getting the lab back into business. I missed most of the exercise schedule during this week, except some basketball on Tuesday and some Tennis today.

I recieved Rakhris in the mail from my sister in Texas and Canada. I remembered the days past by, the days in India and felt nostalgic for a little while.

Rakhri

Friday evening, department of student life had arranged an ice-cream social, where a 15 minute documentary - Celebrate What’s Right With The World was shown. A beautiful vision and very nicesly shot documentary.

Next week is going to be busy. But for now, I’m enjoying the weekend and reading a book on typography - Thinking in Type. It has been pretty interesting read so far.

→ 1 CommentTags:·

Git Configurations

August 5th, 2008 by { Arvinder Kang } · No Comments · Programming

I have started using Git over Subversion. Following is the list of my git configurations.

[Read more →]

→ No CommentsTags:

Randy Pausch Last Lecture and the TED talks

August 3rd, 2008 by { Arvinder Kang } · No Comments · Random

I spent some time today watching a couple of videos.

The first one was Randy Pausch’s Last Lecture given at Carnegie Mellon University. Randy who died on July 25, 2008 was an American professor of computer science, human-computer interaction and design at Carnegie Mellon University and creator of Alice.

It was a heart-touching and inspiring talk. I have seen there is one commonality in all great men - mastery of effective communication skills.

[Read more →]

→ No CommentsTags:·

curl vs wget

August 2nd, 2008 by { Arvinder Kang } · No Comments · Programming

Linux mac

Coming from Linux background, while working on OS X shell, I still cannot abandon my old Linux habits. A common one is trying to use wget instead of curl for downloading stuff.

Just out just curiosity, I was wondering why OS X supports curl, but no wget in the OS.

I came across this interesting page doing comparison of the two.

→ No CommentsTags:··

Installing RMagick on OS X Leopard

August 1st, 2008 by { Arvinder Kang } · 2 Comments · Programming

Rmagick Clown

I work with Ruby on Leopard and and I need RMagick.

If you are a programmer and don’t know what RMagick is, you should know how code can melt your picture into art in Ruby:).

[Read more →]

→ 2 CommentsTags:··

Git remote pushing

July 19th, 2008 by { Arvinder Kang } · No Comments · Programming

For the last half an hour I have been playing with Git. Project I’m working on my laptop is version tracked by git. However what is the fun of using version control without a remote server.

As soon as I pushed my project directory to my remote OS X Tiger server, I got the following error.

    bash: line 1: git-receive-pack: command not found
    fatal: The remote end hung up unexpectedly

Google comes to rescue.

    Many installations of sshd do not invoke your shell as the login shell when you directly run programs; what this means is that if your login shell is bash, only .bashrc is read and not .bash_profile. As a workaround, make sure .bashrc sets up $PATH so that you can run git-receive-pack program.

Running following two lines solved the problem.

echo export PATH=/usr/local/bin:$PATH >> ~/.bashrc
source ~/.bashrc

→ No CommentsTags:··

What goes where? Filesystem hierarchy in Unix/Linux/OS X

July 19th, 2008 by { Arvinder Kang } · 1 Comment · Programming

Unix Filesystem Hierarchy

Although it is one of the first chapters one read when starting with Linux/Unix, it is always confusing where should we put what when it comes to installing stuff on Linux/OS X computers.

I found a detailed reference Filesystem Hierarchy standard website.

It is also worth knowing, why is it important to store any new customized apps in /usr/local.

→ 1 CommentTags:··

Using Git on Rails project

July 18th, 2008 by { Arvinder Kang } · No Comments · Programming

After watching Linus Torvalds speaking for Git, and the popularity of Github, I am giving git a try. I have been using Subversion for a while, so things moved pretty smoothly.

[Read more →]

→ No CommentsTags:·

Off to Vancouver, British Columbia

July 4th, 2008 by { Arvinder Kang } · No Comments · Travel

Vancouver map

July 4th and I’m heading to Canada to see my siblings. I haven’t seen my eldest sister and her family in years.

The day is sunny and beautiful. At the moment, we are flying over Tennessee.

At Memphis airport while checking in, I was asked by the security officer that I needed to step out for additional checking. No scanners beeped, no other reasons, except the fact that I was wearing a turban.

It was one of the very few moments in the last three years that I have been in the United States, (I would suppose very few compared to Biharis in Punjab or Haryana would have to deal with), that I felt that congress still makes racist laws. I wonder why TSA does not check for a women’s bra or men’s undergarments, if the sole concern is that some chemical might be hidden in the clothes. Why target only turbans? Simple - Because congress has been known to use scare tactics throughout the history.

My take on the whole thing -

  1. Dumb politicians and idiot right wings responsible for selecting them exist in every country - doesn’t matter how democratic it is.
  2. Racism and regionalism is often painted as patriotism.
  3. Few random incidents should not change your opinion about anything or anyone.

I still believe US is one of the most free nations in the world - definitely more than India is. And I hope to retain this view unless something happens that drastically changes it. In the latter case, I am moving to “ANTARCTICA”!!

→ No CommentsTags:····