Sunday, July 27, 2014

Display size of all subdirectories from current directory in Linux

To display the size the command is "du".

du

You could check the man page and help for the command, a useful modifier is "-h", which as in the "ls" command it converts the size to a more practical representation.

du -h

Show and display human readable size in files and directories listing on Linux

"h" is the ls modifier required to display GB, MB, KB and related information.

ls -lh
ls -lah

Sunday, November 10, 2013

Python str bracket format summary

Number Format Output Description
3.1415926 {:.2f} 3.14 2 decimal places
3.1415926 {:+.2f} 3.14 2 decimal places with sign
-1 {:+.2f} -1 2 decimal places with sign
2.71828 {:.0f} 3 No decimal places
5 {:0>2d} 5 Pad number with zeros (left padding, width 2)
5 {:x<4d} 5xxx Pad number with x’s (right padding, width 4)
10 {:x<4d} 10xx Pad number with x’s (right padding, width 4)
1000000 {:,} 1,000,000 Number format with comma separator
0.25 {:.2%} 25.00% Format percentage
1000000000 {:.2e} 1.00E+09 Exponent notation
13 {:10d} 13 Right aligned (default, width 10)
13 {:<10d} 13 Left aligned (width 10)
13 {:^10d} 13 Center aligned (width 10)

Tuesday, August 13, 2013

Installing Oracle JDK JRE on Debian / Ubuntu


To install it, you just need to execute the following commands in order. I am assuming a new clean installation.

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

Friday, June 14, 2013

Matlab/Octave commands in Python using Numpy


Here I share a website with translation of commands between languages (in this case Matlab/Octave and their corresponding synonyms in Python with Numpy) with their respective syntax.

There are HTML and PDF formats available for download.

Monday, May 13, 2013

Video on Developing Maintainable Code with focus on HTML, JavaScript, CSS - Lessons Learned

A very nice video on developing sustainable and maintainable code, with examples focusing on JavaScript and web, but touching concepts applicable on any software development project and any technology.

Wednesday, May 8, 2013

LinkedIn Family Design - Technologies and Implementations being used on LinkedIn

Lately I had some available time to catch up on various subjects I was away from due to my day-to-day tasks and technologies.

I found this video interesting due to its contents, how useful it is for real applications, and the available information on how a company such as LinkedIn is currently working.