Monday, December 7, 2009
Problema de actualizacion en SVN
diego@earendil:~/svn$ svn checkout https://free1.projectlocker.com/diegoandresalvarez/LaTeX/svn/libro_solidos
diego@earendil:~/svn$ svn export ~/svn/libro_solidos/ /home/diego/libro_solidos_export_repo
Export complete.
diego@earendil:~/svn$ cd ../Desktop/libro_solidos
diego@earendil:~/Desktop/libro_solidos$ svn export . /home/diego/libro_solidos_export_wc
Export complete.
diego@earendil:~/Desktop/libro_solidos$ cd ~/svn/libro_solidos
Utilice Krusader ... Synchronize subdirectory para ver que archivos son más recientes
Copiar los archivos más recientes al repositorio nuevo ....~svn/libro_solidos
Sunday, December 6, 2009
Wednesday, October 14, 2009
Process freezer
here it is cryopid
http://cryopid.berlios.de/
Saturday, September 12, 2009
cpulimit
http://www.howtoforge.com/how-to-limit-cpu-usage-of-a-process-with-cpulimit-debian-ubuntu
Thursday, July 30, 2009
Subversion
svn mkdir https://.../diegoandresalvarez/LaTeX/svn/libro_solidos -m "Creando subdirectorio libro_solidos"
Importar
svn import ~/Desktop/libro_solidos/ https://.../diegoandresalvarez/LaTeX/svn/libro_solidos -m "Initial import"
Checkout: Aquí se creará un subdirectorio libro_solidos que contiene los archivos que están adentro
svn checkout https://free1.projectlocker.com/diegoandresalvarez/LaTeX/svn/libro_solidos
login>> diegotorquemada@gmail.com
pass>> ya lo sabe
Exportar (sacar copia sin los .svn)
svn export ~/Desktop/libro_solidos/ https://.../diegoandresalvarez/LaTeX/svn/libro_solidos
Lista de proyectos
svn list --verbose https://.../diegoandresalvarez/LaTeX/svn/
Remover la parte de archivos ejecutables... parado en el padre de libro_solidos haga
svn propdel svn:executable -R libro_solidos
Actualiza copia actual
svn update
Commit a change
svn commit -m "Mensaje"
Agregar y borrar archivos
svn add filename
svn delete filename
Copiar y mover archivos
svn copy original destino
svn move oldposition newposition
Compara actual con repositorio
svn status
Mirar cierta versión de un archivo
ej svn cat -r 19 foo.c
Comparando copia actual con repositorio
svn diff librosolidos.kilepr | kompare -o -
svn diff | kompare -
svn diff |iconv -f ISO_8859-1 -t utf-8 | kompare -o -
svn diff -r 143 energia.tex Compara la copia de trabajo actual con version 143
svn diff --diff-cmd diff > diferencia.txt
http://en.wikibooks.org/wiki/LaTeX/Collaborative_Writing_of_LaTeX_Documents
http://www.tug.org/pracjourn/2007-3/skiadas-svn/skiadas-svn.pdf
http://www.tug.org/pracjourn/2007-3/kalderon-svnmulti/kalderon-svnmulti.pdf
At the end of the [helpers] section in ~/.subversion/config add (tomado de http://brainvisa.info/repository.html)
editor-cmd = kate
diff-cmd = kompare_svn
diff3-cmd = kdiff3_svn
merge-tool-cmd = kdiff3_svn
Here kompare_svn is the script (base their mine merged)
#!/bin/sh
exec kompare "$6" "$7"
And kdiff3_svn is the script
#!/bin/sh
if [ "$#" != "3" ]; then
if [ "$#" != "4" ]; then
outfile=`mktemp`
res=0
# kdiff3 --L1 "$4" --L2 "$6" --L3 "$8" -out "${outfile}" "$9" "${10}" "${11}" && cat "${outfile}" || res=1
kdiff3 -out "${outfile}" "${10}" "${11}" "$9" && cat "${outfile}" || res=1
if [ -f "${outfile}" ]; then
rm -f "${outfile}"
fi
if [ -f "${outfile}.orig" ]; then
rm -f "${outfile}.orig"
fi
exit $res
fi
fi
if [ "$#" -gt 3 ]; then
exec kdiff3 -out "$4" "$1" "$2" "$3"
else
exec kdiff3 "$1" "$2" "$3"
fi
Alternativamente
#!/bin/sh
kdiff3 -m $1 $2 $3 -o $4 1>&2
Remember to make both scripts executable
En caso de conflict resolution haga lo siguiente:
http://chestofbooks.com/computers/revision-control/subversion-svn/Postponing-Conflict-Resolution-Tour-Cycle-Resolve-Pending.html
svn resolved torsion.tex
Wednesday, July 15, 2009
A MATLAB xml file for Kate and Kwrite that supports block comments
to the subdirectory
/usr/share/apps/katepart/syntax/
In line 59: replace "Source" by "Scientific"
Enjoy!
Sunday, June 14, 2009
Configurar Webcam genius eye 110 en Debian Lenny
Si le damos un lsusb
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 002: ID 093a:2472 Pixart Imaging, Inc.
Bus 001 Device 001: ID 0000:0000
Lo primero que hacemos es descargar el siguiente programa
apt-get install build-essential linux-headers-$(uname -r)
wget http://debian.lcs.mit.edu/debian/pool/main/g/gspca/gspca-source_01.00.20-1_all.deb
dpkg -i gspca-source_01.00.20-1_all.deb
cd /usr/src
ls -l
-rw-r–r– 1 root root 170815 2008-01-09 05:47 gspca.tar.bz2
tar jxvf gspca.tar.bz2
cd modules/
cd gspca/
m-a prepare
m-a a-i gspca
modprobe gspca
lsmod |grep gspca
ls /dev/vid*
/dev/video0y Listo ya tenemos nuestra camara web funcionando :-D
Tomado de:
http://contenidosdidacticos.com/index.php?option=com_content&task=view&id=241&Itemid=28
Sunday, May 3, 2009
Greek font in MAXIMA
SPIonic.ttf
For Windows systems, place this font in the directory \Windows\Fonts. For Linux, place it in /usr/share/fonts (there may be some distribution-dependent variations in this location). Next, for all platforms, run wxMaxima and go to the menu item "Edit ... Configure ... Style tab", select "Use Greek Font", then click the "Greek" button, navigate to and select the font you have just installed.
The change should take effect immediately. To test the ability of wxMaxima to render correctly, type examples of Greek characters in wxMaxima using this notation:
%Omega;The results shown above indicate success. If your typed strings reappear in the output unchanged, something went wrong — go over the instructions above and repeat any steps you missed.
Ω
%omega;
ω
Thereafter activate this font in wxMaxima, from Edit>Configure>Style>Use greek font
Sunday, March 22, 2009
How to play a DVD video iso
$ cat /dev/dvd/ > $HOME/video.iso
To play it
$ kaffeine dvd:$HOME/video.iso
Wednesday, March 18, 2009
dyndns.org
In order to have a dynamic dns address, do the following:
- Open an account at http://www.dyndns.com/
- Now we have to install a client to update the ip address everytime we have a new IP address: in this case from synaptic I chose ddclient (see also http://www.dyndns.com/support/clients/ )
# sudo apt-get install ddclient
To configure ddclient, edit the file /etc/ddclient.conf and run
the tool in https://www.dyndns.com/support/tools/clientconfig.html
In the webpage of ddclient: http://ddclient.wiki.sourceforge.net/ you can learn how to configure it.
A tutorial for configuring ddclient in dyndns.org is https://www.dyndns.com/support/kb/using_ddclient_with_dyndns_services.html
Another tools for linux are
- ndyndns >> http://code.google.com/p/ndyndns/
- and the ones in https://www.dyndns.com/support/clients/unix.html
In order to check if ddclient is working...
$ nslookup earendil.dyndns.org
You can also try to go to
https://www.dyndns.com/support/tools/dnsquery.html
and in the field Query and Record Type: write down earendil.dyndns.org
OPEN THE PORTS IN THE ROUTER... PORT FORWARDING
http://portforward.com/
https://www.dyndns.com/support/kb/routers_and_port_forwarding.html
To see if you can access the computer from outside, check that the ports are open with https://www.dyndns.com/support/tools/openport.html
Finally, install OPENVPN ( https://www.dyndns.com/support/kb/using_openvpn_with_dyndns.html )
- - https://www.dyndns.com/support/kb/cat_web_server.html
- - https://www.dyndns.com/support/kb/dynamic_dns_apache_and_windows.html
Some links that might be useful in case of troubles
- https://www.dyndns.com/support/kb/why_cant_i_connect_to_my_server.html
- https://www.dyndns.com/support/kb/dns_caching.html
- https://www.dyndns.com/support/kb/loopback_connections.html
- http://dyndnscommunity.com/forum/
Other pages that provide similar services to dyndns.org are
- http://www.no-ip.com/
- https://www.opendns.com/start/
- http://www.dnsadvantage.com/index.html
- And the 40 listed at http://www.dmoz.org/Computers/Internet/Protocols/DNS/DNS_Providers/Dynamic_DNS/
- http://www.everydns.com/
Friday, March 13, 2009
Iceweasel as Firefox
Everybody knows Iceweasel is actually Firefox 3, everyboby except Google. When you visit http://gears.google.com, an ugly message says “your browser is not supported”.
The solution is easy: trivial user agent cheating
- Point your iceweasel to “about:config”.
- Find a key called “general.useragent.extra.firefox” and edit to “Firefox/3.0.5”
Monday, March 9, 2009
Red prompt when ROOT
function setprompt
{
local RED="\[$(tput setaf 1)\]"
local RESET="\[$(tput sgr0)\]"
if [ `id -u` = 0 ] # check if user is root
then
PS1="$RED[\u@\h:\W]$RESET "
else
PS1="[\u@\h:\W]$RESET "
fi
}
setprompt
Thursday, March 5, 2009
Installling LINUX at UNAL
Proxy: http://192.168.100.3:8888/
Install the basic programs only.
Write down in the console
export ftp_proxy=http://192.168.100.3:8888/
export http_proxy=http://192.168.100.3:8888/
export https_proxy=http://192.168.100.3:8888/
Then
# apt-get install desktop kde-desktop
Remove kdetoys kdegames kdeaccesibility kdeedu
http://docking.ncl.ac.uk/proxy/linux/
You can also write down in your ~/.bashrc
export ftp_proxy=http://192.168.100.3:8888/
export http_proxy=http://192.168.100.3:8888/
export https_proxy=http://192.168.100.3:8888/
Tambien podría eventualmente funcionar:
export http_proxy="http://168.176.195.227:8888/"
export https_proxy="http://168.176.195.227:8888/"
export ftp_proxy="http://168.176.195.227:8888/"
Add to .bashrc the following lines
export ftp_proxy=http://192.168.100.3:8888/
export http_proxy=http://192.168.100.3:8888/
To configure aptitude, add to /etc/apt/apt.conf the line
Acquire::http::Proxy "http://192.168.100.3:8888/";
Configure Firefox:
Edit/Preferences/Advanced/Network
Connection-Settings
Check Manual proxy configuration
HTTP proxy 192.168.100.3
Port 8888
Check: USE THIS PROXY SERVER FOR ALL PROTOCOLS
No proxy on: localhost, 127.0.0.1, 168.176.*, .unal.edu.co
Control Center-> Proxy
Manually specify the proxy settings
Servers
HTTP: http://192.168.100.3 PORT: 8888
Check Use the same proxy server for all protocols
Servers
HTTP: http://192.168.100.3 PORT: 8888
Check Use the same proxy server for all protocols
Saturday, February 21, 2009
Installing MATLAB in Debian 5 Lenny
I create
# mkdir /usr/local/matlab
# cp /***/license.dat /usr/local/matlab
Then if I do /media/cdrom/install
I get the following error:
earendil:/usr/local/matlab# /media/cdrom/install
-------------------------------------------------------------------
An error status was returned by the program 'xsetup',
the X Window System version of 'install'. The following
messages were written to standard error:
Can't open display.
Attempt to fix the problem and try again. If X is not available
or 'xsetup' cannot be made to work then try the terminal
version of 'install' using the command:
install* -t or INSTALL* -t
-------------------------------------------------------------------
Sorry! Setup aborted . . .
According to some forums do:
# apt-get install libxp-dev
However, I did follow the instructions of:
http://www.debianhelp.org/node/7432
1. Let run the install script so that it creates some environmental variables correctly.
2. Then
# cp /media/cdrom/update/bin/glnx86/libmwins.so /usr/lib
or
# cp /media/cdrom/update/bin/glnxa64/libmwins.so /usr/lib64
Check if you want to install the one of glnx86, glnxa64 and sol64 instead
3. Copy xsetup from the same directory to the install directory.
# cp /media/cdrom/update/bin/glnx86/xsetup /usr/local/matlab
4. From the home directory: (somewhere where install does not reside)
# /home/daa/cdrom/install
LATER when you run matlab you will see some errors associated to java
install java (http://www.java.com/en/download/index.jsp)
and then edit the file in bin/matlab
at the begining of the script (around line 180) write down:
# There is an error with the java that comes with MATLAB. Use the other java
export AWT_TOOLKIT=MToolkit
#export MATLAB_JAVA=/usr/lib/jvm/java-1.6.0-sun-1.6.0.10/jre
#export MATLAB_JAVA=/usr/lib/jvm/java-1.5.0-gcj-4.3-1.5.0.0/jre
export MATLAB_JAVA=/opt/jre1.6.0_12/
Finally activate the multithreading part in Preferences
ENJOY!
Installing LIBTRASH
IGNORE_HIDDEN = NO
IGNORE_EDITOR_BACKUP = NO
UNREMOVABLE_DIRS=/bin;/boot;/dev;/etc;/lib;/sbin;/usr
then
$make
#make install
add to /etc/profile, /etc/bash.bashrc and $HOME/profile, $HOME/bash.rc the following lines:
# LIBTRASH requires the following four lines
export LD_PRELOAD=/usr/local/lib/libtrash.so
alias su="su -l"
alias trash_on="export TRASH_OFF=NO"
alias trash_off="export TRASH_OFF=YES"
If you want to change something in the configuration, make it in the file ".libtrash", using as an example /etc/libtrash.conf
Remember that has to create the trash subdirectory that is for example $HOME/Trash
Finally to check that all is working
$ su -c "set|grep LD_PRELOAD"
Should output something like:
LD_PRELOAD=/usr/local/lib/libtrash.so
Thursday, February 19, 2009
Packages to be installed
amule
basket
dict
dict-gcide
dict-moby-thesaurus
dict-wn
djview4
gwenview
hugin (it requires to add to /etc/apt/sources.list references to http://www.debian-multimedia.org/ in order to install autopano-sift-c)
inkscape
joe
kchmviewer
kde
kflickr
kile
krename
krusader
lha
libqt4-core
mc
mplayer
ntfs-3g
octave
pdfjam (este es para pdfnup)
p7zip
rar
rpm
ssh-server
unace
unarj
unrar
workrave
xine
xmms
And download from their respective webpages:
adobe flash
acrobat reader
java (http://www.java.com/en/download/index.jsp)
picasa
realplayer
skype
texlive
virtualbox
libtrash (recuede leer el archivo de configuracion y ejecutar al final
su -c "set|grep LD_PRELOAD"
y
set|grep LD_PRELOAD
para verificar que todo esta bien).
WIN32 Codecs... in /usr/lib/win32.
Download the codecs here: http://www.mplayerhq.hu
copy all the codes to /usr/lib/codecs
then create the following soft links:
# ln -s /usr/lib/codecs /usr/local/lib/codecs
# ln -s /usr/lib/codecs /usr/local/lib/win32
# ln -s /usr/lib/codecs /usr/lib/win32
libdvdcss http://developers.videolan.org/libdvdcss
Tuesday, February 17, 2009
ntfs-3g
My /etc/fstab is, for example:
# /etc/fstab: static file system information.
#
#
proc /proc proc defaults 0 0
/dev/hda1 / ext3 errors=remount-ro 0 1
/dev/hda6 /home ext3 defaults 0 2
/dev/hda5 none swap sw 0 0
/dev/sda6 none swap sw 0 0
/dev/hdb /media/cdrom0 udf,iso9660 user,noauto 0 0
# Disco duro Mandriva 2009
/dev/sda5 /media/hd ext3 defaults 1 1
/dev/sda1 /media/windows ntfs-3g defaults 0 0
#none /proc proc defaults 0 0
#none /tmp tmpfs defaults 0 0
#/dev/sda6 swap swap defaults 0 0
#/dev/sda1 /media/hd2 ext3 defaults 1 2
Configuring the "Microsoft Ergonomic Natural Keyboard 4000" under Debian 5 Lenny
"Legacy USB keyboard support" option
Install the unstable package xkb-data_1.5-2_all.deb
In the kcontrol (control center) -> keyboard layout: activate the keyboard model "Microsoft Natural Wireless Ergonomic Keyboard 7000".
And voila!
If you want to test the keys use the
$ xev
command, and run
$ modmap -pke
in order to see all the keycode associations.
I also changed my /etc/X11/xorg.conf to
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "XkbRules" "xorg"
Option "XkbModel" "microsoft7000"
Option "XkbLayout" "latam"
EndSection
Saturday, January 3, 2009
Modem de Melvin
/etc/wvdial.conf y escriba lo siguiente
[Dialer Defaults]
Phone = *99***1#
Username = telfort
Password = telfort
Stupid Mode = 1
Dial Command = ATDT
[Dialer reset]
Modem = /dev/ttyUSB0
Init1 = AT
[Dialer telfort]
Phone = *99***1#
Modem = /dev/ttyUSB0
Baud = 460800
Init2 = ATZ
Init3 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ISDN = 0
Modem Type = Analog Modem
Init5 =AT+CGDCONT=1,"IP","telfort.nl";
Para el internet, desde la consola ejecute
wvdial telfort
abra el firefox y desactivar Archivo>Trabajar sin conexion