Wednesday, June 17, 2015
Monday, November 26, 2012
EPS in latex
In linux add this to preamble
\usepackage{epstopdf}
Then
\begin{document}
\includegraphics{figure.eps}
\end{document}
and run
$pdflatex -shell-escape yourfile.tex
This will convert the eps file to a pdf that latex can digest!
Enjoy
\usepackage{epstopdf}
Then
\begin{document}
\includegraphics{figure.eps}
\end{document}
and run
$pdflatex -shell-escape yourfile.tex
This will convert the eps file to a pdf that latex can digest!
Enjoy
Monday, January 10, 2011
Ubuntu 10.04 and the new button layout
I do not understand the reasons behind ubuntu people changing the location of the menu buttons from left to right.
I have been using ubuntu since the old days of Breezy and always have the minimize/maximize/close buttons on the right. Is there any reason to suddenly change such default?
In any case, you can change them back see here http://www.howtogeek.com/howto/13535/move-window-buttons-back-to-the-right-in-ubuntu-10.04/
I have been using ubuntu since the old days of Breezy and always have the minimize/maximize/close buttons on the right. Is there any reason to suddenly change such default?
In any case, you can change them back see here http://www.howtogeek.com/howto/13535/move-window-buttons-back-to-the-right-in-ubuntu-10.04/
Tuesday, October 12, 2010
ALSA not working!!
Getting error like this all the time are so annoying
ALSA lib pcm.c:2211:(snd_pcm_open_noupdate) Unknown PCM dmix:NVidia
if you have compiled alsa from source and can see the volume control, etc, but still speaker-test is showing all of the weird errors about device not found, or unkown PCM then it is probably the ~/.asoundrc file
The file will have a line that points by default to ~/asoundrc.asoundconf comment this line, and you should have your speakers back to life :)
ALSA lib pcm.c:2211:(snd_pcm_open_noupdate) Unknown PCM dmix:NVidia
if you have compiled alsa from source and can see the volume control, etc, but still speaker-test is showing all of the weird errors about device not found, or unkown PCM then it is probably the ~/.asoundrc file
The file will have a line that points by default to ~/asoundrc.asoundconf comment this line, and you should have your speakers back to life :)
Wednesday, January 6, 2010
No sound from speakers, but headphone ok
I just upgraded ubuntu from 9.04 to 9.10. I hate upgrading, I like a clean install. In any case, the speakers sound stopped working, while headphones work!
After some investigation, left over pulse audio config files where causing problems, a fix is to remove them
cd
rm -rf .pulse*
tada! done works nicely
After some investigation, left over pulse audio config files where causing problems, a fix is to remove them
cd
rm -rf .pulse*
tada! done works nicely
Monday, January 4, 2010
Good tutorial on how to add disks to linux
http://www.techotopia.com/index.php/Adding_a_New_Disk_Drive_to_an_Ubuntu_Linux_System
Saturday, November 28, 2009
Gnome Keyring! Why? and how to change it!
In a world of having at least 10 different passwords to remember, you gmail password, your hotmail password, you school/work password, your yahoo password, your random passwords, your friends passwords, etc. Suddenly, Gnome Keyring decides to have an uneasily changeable password.
Why do we need a gnome keyring password? I do not get it. Gnome is based on simplicity, ease of use, clarity and all of those very nice high values. Suddenly, Gnome Keyring pops up with "Please enter keyring password"
What if I no longer remember that old password. What if I decided to give my laptop to a friend and changed my password to some easy one they can remember. Well, guess what, they can't access the Internet, because the keyring password is a different story.
Here is how to change your password on ubuntu 9.04
rm ~/.gnome2/keyrings/login.keyring
On earlier versions of ubuntu, follow this http://mexpolk.wordpress.com/2008/02/06/ubuntu-change-default-keyring-password/
ahhhh gnome keyring!!
Why do we need a gnome keyring password? I do not get it. Gnome is based on simplicity, ease of use, clarity and all of those very nice high values. Suddenly, Gnome Keyring pops up with "Please enter keyring password"
What if I no longer remember that old password. What if I decided to give my laptop to a friend and changed my password to some easy one they can remember. Well, guess what, they can't access the Internet, because the keyring password is a different story.
Here is how to change your password on ubuntu 9.04
rm ~/.gnome2/keyrings/login.keyring
On earlier versions of ubuntu, follow this http://mexpolk.wordpress.com/2008/02/06/ubuntu-change-default-keyring-password/
ahhhh gnome keyring!!
Saturday, October 24, 2009
Boot existing Vista from virtualbox on ubuntu
this is a great tutorial on how to do this http://www.qc4blog.com/?p=483
Tuesday, October 20, 2009
mpeg2encode on debian/ubuntu
Have ever waited for a lot of time on convert *.jpg output.mpeg and then it told you convert: Delegate failed `"mpeg2encode" "%i" "%o"' .. dahhhh
get mpeg2encode from here http://www.mpeg.org/pub_ftp/mpeg/mssg/mpeg2vidcodec_v12.tar.gz untar, make and you are done!
get mpeg2encode from here http://www.mpeg.org/pub_ftp/mpeg/mssg/mpeg2vidcodec_v12.tar.gz untar, make and you are done!
Monday, April 27, 2009
Disable system beep in linux
remove the module
sudo rmmod pcspkr
then blacklist it
add this to the file /etc/modprobe.d/blacklist
blacklist pcspkr
Done!
sudo rmmod pcspkr
then blacklist it
add this to the file /etc/modprobe.d/blacklist
blacklist pcspkr
Done!
Thursday, February 12, 2009
some netstat
to show active connections
to show open ports
will have some more of these later!
netstat -nat
to show open ports
netstate -tulp
will have some more of these later!
Wednesday, February 11, 2009
Sunday, January 18, 2009
libf2c.so: undefined reference to `MAIN__'
Alright.. so problems with libf2c with debian, ubuntu, etc, getting too much of libf2c.so: undefined reference to `MAIN__'
ok, just link with the static library "libf2c.a"
sudo rm /usr/lib/libf2c.so && sudo ln -s /usr/lib/libf2c.a /usr/lib/libf2c.so
Done!
ok, just link with the static library "libf2c.a"
sudo rm /usr/lib/libf2c.so && sudo ln -s /usr/lib/libf2c.a /usr/lib/libf2c.so
Done!
Wednesday, October 1, 2008
Latex Figure and \label
Always put the label after the caption, otherwise floats wont be referenced in text !!!!
just ridiculous :s
just ridiculous :s
Sunday, July 27, 2008
Friday, July 25, 2008
Saturday, July 19, 2008
Google Codejam
Saturday, July 5, 2008
Sunday, June 29, 2008
Adding a line at EOF to a bunch of files at once
Some people use horrible IDE's to write some horrible C/C++ code that will give many nasty warnings in gcc/g++ because of a missing line at the end of file
here is how to add a line to the end of each file
It could be a more sophisticated line of bash, but this will do for the mean time
here is how to add a line to the end of each file
for f in `find . -type f | grep ^.*.c`; do echo -e "\n" >> $f; done
It could be a more sophisticated line of bash, but this will do for the mean time
Saturday, May 10, 2008
Installing Matlab on Linux
Unfortunately, Matlab is not free!! and i currently only have Matlab 7 R14 student version. In any case we'll install Matlab on linux..
step 1: insert the CD into the CD-ROM
step 2: go to /media/cdrom (that is in ubuntu)
step 3: sudo ./install_unix.sh
this will run a "nice" installer, it'll prompt you for a root directory for matlab files. If you keep your /home partition separate from the / partition then install matlab somewhere in /home so you don't have to install it every time you feel like getting a new linux version, otherwise /usr/local/matlab sounds like a good choice.
The script will also ask you if you want to create symlinks in /usr/local/bin or whatever directory in the $PATH, it is a good idea to say 'y' so that you don't have to put the full path name every time you feel like Matlabing :)
step 4: install gawk so Matlab will hopefully work, and you also should have java installed preferably java-sun, not the gcj; sudo apt-get install gawk
step 5: go to where ever you installed matalb, say /usr/local/matlab and enter the bin directory /usr/local/matlab/bin and run ./matlab this will ask you for the serial number, enter your serial number and enjoy Matlabing for the rest of the night!!
* Notice that a "student license" is only good for one computer :(
Have fun!
step 1: insert the CD into the CD-ROM
step 2: go to /media/cdrom (that is in ubuntu)
step 3: sudo ./install_unix.sh
this will run a "nice" installer, it'll prompt you for a root directory for matlab files. If you keep your /home partition separate from the / partition then install matlab somewhere in /home so you don't have to install it every time you feel like getting a new linux version, otherwise /usr/local/matlab sounds like a good choice.
The script will also ask you if you want to create symlinks in /usr/local/bin or whatever directory in the $PATH, it is a good idea to say 'y' so that you don't have to put the full path name every time you feel like Matlabing :)
step 4: install gawk so Matlab will hopefully work, and you also should have java installed preferably java-sun, not the gcj; sudo apt-get install gawk
step 5: go to where ever you installed matalb, say /usr/local/matlab and enter the bin directory /usr/local/matlab/bin and run ./matlab this will ask you for the serial number, enter your serial number and enjoy Matlabing for the rest of the night!!
* Notice that a "student license" is only good for one computer :(
Have fun!
Subscribe to:
Posts (Atom)
