October 13, 2009, 8:18 pm
If you want to know which RAM is installed in your PC (DDR, DDR2…) and its speed, type this command:
$ sudo dmidecode --type 17
Remember that dmidecode can provide additional (useful) information about your HW.
October 11, 2009, 11:35 am
If you are going to develop Verilog/VHDL code using eclipse I’ve got good news for you. Veditor provides a nice environment to work with Verilog. To install it click Help->Install new software. The repository URL is at:
http://veditor.sourceforge.net/update
Be sure to uncheck Group items by category, otherwise Veditor won’t show up.
October 11, 2009, 11:22 am
First go here and choose your operating system and architecture. Download the corresponding jre.
$ chmod +x jre-6u16-linux-i586-rpm.bin
$ sudo ./jre-6u16-linux-i586-rpm.bin
Probably your system has another java version already installed:
If this is the case select the new jre using alternatives:
$ sudo alternatives --install /usr/bin/java java /usr/java/jre1.6.0_16/bin/java 2
$ sudo alternatives --config java #choose 2
To check that the selection has worked:
$ alternatives --display java
$ java -version
September 20, 2009, 2:07 pm
September 11, 2009, 12:40 pm
To control VMware Workstation Virtual Machines from the command line use the vmrun utility. For instance, to stop a running virtual machine use this command:
For a comprehensive guide on vmrun take a look at this document.
September 5, 2009, 6:41 pm
By default Latex indents all the paragraphs except the first paragraph of the section. To modify this behavior include the indentfirst package in your document’s preamble:
September 2, 2009, 4:55 pm
I’ll be using my Gmail account to send mail. The first step is to configure the local Postfix server as a relay. Edit /etc/postfix/main.cf:
sudo vim /etc/postfix/main.cf
Search for a “relayhost=” line and add the following after it:
relayhost = smtp.gmail.com:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =
smtp_sasl_local_domain = yourdomain.com
#smtpd_sasl_application_name = smtpd
broken_sasl_auth_clients = yes
smtpd_pw_server_security_options = noanonymous
smtp_use_tls=yes
smtp_tls_security_level=encrypt
tls_random_source=dev:/dev/urandom
Next create /etc/postfix/sasl_passwd and add the following (replace username and password accordingly):
smtp.gmail.com:587 username@gmail.com:password
Next run the following commands:
$ sudo postmap hash:/etc/postfix/sasl_passwd
$ sudo chown root:wheel /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.db
$ sudo chmod 600 /etc/postfix/sasl_passwd /etc/postfix/sasl_passwd.db
You should be able to send mail from the command line now:
$ mail -s "Test" username@domain.com
You can check mail’s log file at /var/log/mail.log
To be able to send attachments from the command line (true attachments that graphical mail clients understand) install mutt:
$ curl -O ftp://ftp.mutt.org/mutt/devel/mutt-1.5.20.tar.gz
$ tar xfzvv mutt-1.5.20.tar.gz
$ cd mutt-1.5.20/
$ ./configure
$ make
$ sudo make install
To send attachments use the following command:
echo "text body" | mutt -s "subject" -a file.dat -- username@domain.com
Or even better:
for i in {1..1000}; do echo "text body" | mutt -s "subject" -a file.dat -- username@domain.com; done
Happy mailing!
September 1, 2009, 11:33 am
Have you ever been curious about the first registered domain name? Well, it was symbolics.com.
August 31, 2009, 9:35 am
First upload your public key to the server you want to log in:
scp .ssh/id_rsa.pub user@1.2.3.4:/home/user
On the server, add the public key file to the authorized_keys file:
cat id_rsa.pub >> .ssh/authorized_keys
Now you can login using public key authentication and you don’t have to enter a password anymore.
August 28, 2009, 9:47 am
To find which servers handle mail for a particular domain use dig:
;; QUESTION SECTION:
;google.com. IN MX
;; ANSWER SECTION:
google.com. 561 IN MX 100 google.com.s9a1.psmtp.com.
google.com. 561 IN MX 100 google.com.s9a2.psmtp.com.
google.com. 561 IN MX 10 smtp1.google.com.
google.com. 561 IN MX 10 smtp2.google.com.
google.com. 561 IN MX 10 smtp3.google.com.
google.com. 561 IN MX 10 smtp4.google.com.