RSS
 

Archive for the ‘Operating System’ Category

Ubuntu: Two or more plots in the same windows

15 Jul

The mode is called MULTI-PLOT.

Gnuplot can plot more than one figure in a frame ( like subplot in matlab ) i.e., try:

set multiplot; # get into multiplot mode
set size 1,0.5;
set origin 0.0,0.5; # The upper plot
plot sin(x);
set origin 0.0,0.0; # The bottom plot
plot cos(x)
unset multiplot # exit multiplot mode

 
No Comments

Posted in Ubuntu

 

Ubuntu: Convert ogg to avi

15 Jul

Most of the time, I record with recordMyDesktop which produces .ogg-Videos. So any need to convert it to avi file to share the screen-cast.
First you need memcoder, so install it:
sudo apt-get install memcoder
Next use this commend:
mencoder out.ogg -o out.avi -oac mp3lame -ovc lavc

  • out.ogg is the .ogg-file you want to convert
  • out.avi is the .avi-file you want to create
  • mp3lame is the used audio-codec (here mp3)
  • lavc is the used video-codec (here libavcodec)
 
No Comments

Posted in Ubuntu

 

Ubuntu: Mount a FTP account as a folder

13 Jul

To keep all my data synchronized between my machines and also have version of them in the same time without having an public svn repository. I use my ftp account as a repository for my local svn server. So my svn server is just an engine which store data on FTP mounted folder. I covered the method to install SVN server in other post and today I want to introduce the FTP mounting as a folder. The used tool is curlftpfs.

1. If you don’t already have curlftpfs installed, install it with
sudo apt-get install curlftpfs
2. Replacing the appropriate settings, mount the share with
sudo curlftpfs -o umask=0777,uid=1000,gid=1000,allow_other ftp://username:password@your.ftpserver.com /media/ftpfolder
Make sure that the location to mount to is already created and readable and writable by all users.
3. To make this permanent, add it to the end of /etc/init.d/rc.local to be able to access the share after reboot. Other option is to add it to ~/.bashrc. It is your choice

It is a bit slow but it works!

 
No Comments

Posted in Ubuntu

 

Ubuntu: Gnuplot output eps file

08 Jul

To let Gnuplot generate an eps file in order to include it in Latex:

set term post enh # enhanced PostScript, essentially PostScript with bounding boxes
set out ‘gplt.eps’
set xlabel ‘{/Symbol q_1}
set ylabel ‘sin^2({/Symbol q_1})’
plot sin(x)**2

 
No Comments

Posted in Ubuntu

 

Ubuntu: convert between EUC and UTF-8 encoding

06 Jul

To convert between EUC and UTG-8 encoding I used NKF.

sudo apt-get install nkf

The usage :

EUC–>UTF-8

nkf -d -w80 euc.text > utf.tex

UTF-8–>EUC

nkf -d -e utf.text > euc.tex

To convert all the content of a folder:

$ mkdir utf8

$ for i in `ls -I utf8`; do echo $i; nkf -d -w80 $i > utf8/$i ; done

 
No Comments

Posted in Ubuntu