Archive for January, 2009
Sending Emails with Matlab
This method is (as far as I know) not found in the official Matlab’s documentation. I found it a long time ago somewhere in the internet (don’t remember where, sorry). It’s intended for sending Emails using Matlab.
In order to use it, you should have an Email account which supports SMTP (eg. Gmail). This account will be the account we’re sending the messages through.
The script assumes you’re using Gmail, but it can be easily modified to use other Email suppliers (are there any?)
Enhanced Bash
The first thing I do when I install a new Linux on my machine is updating .inputrc and .bashrc files to support “Enhanced Bash”. These improves might look minor at first glance, but they had improved my experience with the shell very much.
The main features you achieve by enabling “Enhanced Bash” are:
Removing Control Characters From a Text File in Linux
A few weeks ago, I had a text file generated in widows, and it had the “^M” control character at the end of each line. I had to compare it with a similar file generated on my Linux machine (using diff), and because of these control characters it failed diff.
The first step was to check why diff failed. Normally, you cannot see these control characters, and one might be surprised that the comparison fails thought the files are exactly the same. In order to see these characters, one should use “-A” flag with the cat command:
Tips For Using Bash History
Here are a few ways to use the bash history efficiently. It can make your (linux) life easier, but you should be careful when using some of them:
1. history: this command will show you the last commands you’ve typed, notice that each command (line) has a number, we’ll make use of it in the next tip.
2. exclamation mark + number: typing an exclamation mark followed by a number (e.g. !102) will call (i.e. re-enter) the command at line 102 (this is the number of the command as appears when you invoke the “history” command.
Ubuntu Pocket Guide and Reference – A Free Ebook
From the Book’s website:
- Focuses on core competencies and background knowledge needed to be an expert Ubuntu user;
- Readable, accessible, and easy to understand—even if you’ve never used Linux before;
- 100% new and original! Written from the ground-up to cover Ubuntu 8.04 and 8.10.
You can get it here (for free)
Credits: http://www.ubuntupocketguide.com
Enjoy!
Playing With Youtube Videos in Linux
In this short post I’ll introduce a csh script I wrote recently. I wrote it for a certain purpose and it’s definitely not “general purpose”. I’m posting it here so you/I can use it as a reference.
The script uses these programs:
1. youtube-dl (In ubuntu, you can get it by typing : sudo apt-get install youtube-dl).
2. ffmpeg (Again: sudo apt-get install ffmpeg)
3. avimerge (part of the transcode package: sudo apt-get install transcode)
How to Convert a Number into a String in C++
I found a few ways to convert a number into C++, some of them are C style (like using sprintf), and some are ugly (i.e non-standard, like using itoa), and there some nice way which uses string streams to achieve this.
Where going to define and implement a function called Stringify, which accepts an integer and returns a string (this can be extended to accept any numeric value).
Using Gmail to Fight Chain Mails
I’ve already talked in a previous post about how chain mails drive me mad.
Now it’s time to take action, using Gmail’s powerful feature.
One thing one can do, is using Gmail filters to identify chain mails according to the mail’s subject (Which will be typically “Fw:Fw something” or similar), and archive/delete/label this message. But, this is not aggressive enough. Here is another action one can take using another powerful Gmail feature (currently a “Labs” feature).
How (Not) to Forward an Email Message
Getting a message in your mailbox with the title “Fw:Fw:Fw very cool video” is an unpleasant experience.
Such things make me very angry. I hate these messages, and I have a strong need to punch the sender in the face when I receive them.
I’m going to reply to such messages with a link to this post, so, if you’re here because you clicked a link in an Email message, then:
1. You already know how I feel about you.
2. You should know that you did something wrong.
3. Please continue reading.
The History of The Internet (Video)
This is a nice, short and well animated video I came around, describing the history of the Internet since 1950′s till today.
› Continue reading
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)
