Archive for March, 2009
Watch Lectures From Top Universities in YouTube
The EDU channel in YouTube suggests a great collection of high quality lectures from many universities all over the world, like MIT, Stanford University and many others.
You have the option to subscribe to channels by university
Visit YouTube EDU here.
Click here to see a list of participating universities and colleges
Enjoy the knowledge
Create Cool Charts With Google Charts API
I recently discovered this great service by Google, which allows you to create many types of charts using a very easy API call.
This service is great for displaying dynamic data since the API call can be used as the image source, which means that using PHP/Javascript or any other dynamic language for forming the API call, will “link” your chart with the dynamic data you want to display
Here are a few calls along with the results:
Linux Fork Bomb Explained
One famous way to crash your Linux system is to run a “fork bomb” in the terminal. A variant of it looks like this:
WARNING: Malicious code. Don’t run it!
1 | :(){:|:&};: |
This code looks strange, but it’s actually a conventional code in Bash. To make it a little more obvious, let’s replace the : (colon) with the word bomb. So, our code now looks like this:
1 | bomb(){bomb|bomb&}; bomb |
Navigate Efficiently To Your Most Used Directories With Autojump
Autojump is “a cd command that learns”.
I use to visit a small number of directories on daily basis. For example, every time I want to visit my studies directory I used to type:
cd ~/Studies/Winter2009/
With autojump, I just need to type:
j Win
And hit the [tab] key (It supports auto-completion).
Source Code of Steve Balmer Leaked
Source Code of M$’s CEO, Steve Balmer:
1 2 3 4 5 6 7 8 9 | #include <stdio .h> int main() { for (;;) printf("Developers "); return 0; /* This point is never reached */ } </stdio> |
If you didn’t get the joke, watch this video (untouched!)
Now the (lack of) quality of their products starts to make sense ha?
Talking about M$ and Steve Balmer, here is another video (untouched! really!)
Copy a Directory Along With Its Relative Path
Today, a friend of mine wanted to do this:
Copy a directory from path A to path B, preserving its relative path.
For example, if the directory is found at:
./old/path/of/dir
and we want to copy it to
./new/place/
We want the result look like this:
./new/place/old/path/to/dir
Send Self Reminders To Your Email From The Command Line
The following will allow you to send self reminders/TODO items to your Email at a specific time.
For example, if you want to remind yourself to submit an assignment at 15:20, you’ll be able to run this command to do it:
tdr “submit assignment” 15:20
This will send an Email to you, with the subject: [TODO] submit assignment. Email will be sent at 15:20.
To be able to do this, you migh need to configure your mail command (see my post about this).
Then, add this function to your ~/.bashrc file (or any file sources in bashrc):
Send Email from the Command Line using Gmail Account
Sometimes you want to send a quick/short E-mail to somebody, send a TODO item to yourself, or let a script/program Email you when it’s done. For these I found the Linux mail command very useful.
Using it is as easy as typing:
mail -s “Subject” receipt@domain.com
Then enter the message and end it with [ctrl]+[D].
However, if your ISP s!#$% like mine, you’ll discover that no mail was really sent.
To work around this, I wanted to configure my mail program to use Gmail’s SMTP server.
Mount ISO Images From the Command Line
To mount an ISO image from the linux command line:
sudo mount -o loop image_file.iso /path/to/mount/folder
Via Tips4Linux
Create a Directory Tree With One Command
This one is via command-line-fu.
1 | mkdir -p doc/{text/,img/{wallpaper/,photos/}} |
Will create the following directory tree inside current directory:
-doc
—–text
—–img
———-wallpaper
———-photos
About Me
Tags
Categories
- Algorithms
- Bash
- BlackBerry
- Collaboration
- Command Line
- Cool Tricks
- Easter Eggs
- Ebooks
- Firefox
- Hardware
- Humor
- iPhone
- Linux
- Linux Development
- Linux Kernel
- Networks
- Open Knowledge
- Other
- Productivity
- Programming
- Regular Expressions
- Science
- Security
- Shell Scripts
- Short Posts
- Social Networks
- Thoughts
- Tools
- Vim
- Web Development
- Websites
Popular Posts
Calendar
Archives
- September 2010 (2)
- August 2010 (2)
- July 2010 (5)
- June 2010 (1)
- May 2010 (1)
- April 2010 (3)
- March 2010 (1)
- January 2010 (1)
- December 2009 (2)
- September 2009 (13)
- July 2009 (1)
- June 2009 (6)
- May 2009 (4)
- March 2009 (18)
- February 2009 (10)
- January 2009 (10)
- December 2008 (7)
- November 2008 (8)
- October 2008 (1)
- August 2008 (1)
- July 2008 (1)
- June 2008 (1)
