2011-11-26

1-minute Git tutorial/cheatsheet

by Forrest Sheng Bao http://fsbao.net

I assume that you have already had a Git repository somewhere, like Git hub.

I also assume that you have web authentication set up properly, like this

Get a clone:
git clone git@github.com:ACCOUNT/REPOSITORY.git 

Update changes:
git add FILE
git commit -m 'this is a change...'
git push origin master

Remove a file from repository:
git rm FILE
git commit -m 'something is removed'
git push origin master

References: http://help.github.com/

2011-11-06

Assigning a column vector to a row of a matrix in Octave/MATLAB

I just feel this is somehow unsafe.

octave:34> A=[1 2;3 4]
A =

   1   2
   3   4

octave:35> A(1,:) = [5; 6]
A =

   5   6
   3   4

octave:36>  [5; 6]
ans =

   5
   6

2011-11-05

Water recycling in City of Lubbock, Texas

I live in a city with around 500mm rain and 250mm snow per year. So, water is a big problem.

A friend shocked me today. He said a main water source that Lubbock is relying on, Ogallala Aquifer, would run out in 10 years. ``10 years'' may not be the phrase that shocks you the most because Ogallala Aquifer is the WORLD's largest aquifer!

Something that is WORLD's LARGEST will be gone in 10 years? And, Lubbock is the only place that I spent my entire grad school life at. I wish I can point a dot on the map and tell my grandchildren ``this is the place grandpa got PhD.''

So, I went to city website to look for some information. Thank God I can sleep well now. The city of Lubbock is building many canyon lakes, reservoirs and processing plants for possible water recycling. Two reservoirs, Canyon Lake #7 and Post (a small town near by) Reservoirs will become viable in next 20 years. ``Once these projects are complete, the City will have the technology and infrastructure in place to make wastewater recycling a reality.'' [Cite: http://water.ci.lubbock.tx.us/pdf/RateInsertMay09.pdf]

On this map, you can see 3 canyon lakes in the city, Canyon Lakes #2, #3 and #6.


View Larger Map