Para cambiar el display en R a otra maquina
X11( display = “maquina:0″ )
Es una alternativa a salir de R y hacer
export DISPLAY=”maquina:0″
pero no hace falta reiniciar R
Things I shouldn't forget
Para cambiar el display en R a otra maquina
X11( display = “maquina:0″ )
Es una alternativa a salir de R y hacer
export DISPLAY=”maquina:0″
pero no hace falta reiniciar R
Comments Off
Categories: Linux.
$ modprobe dm_multipath
$ losetup -f -v disk.img
Loop device is /dev/loop0
$ kpartx -a -v /dev/loop0
add map loop0p1 (254:0): 0 20971457 linear /dev/loop0 63
$ ls /dev/mapper/loop0*
Comments Off
Categories: Linux.
Ingredients:
Solution:
convert -transparent white file destination_file
You may want to add a fuzz if the border looks too sharp:
convert -fuzz 25% -transparent white file destination_file
Comments Off
Categories: Linux.
Sometimes useful with licensing issues:
Here you will see the cpu cores available.
/sys/devices/system/cpu/
Now you can select the core and trigger to enable or disable with 1 and 0
echo 0 >> /sys/devices/system/cpu/cpu1/online
echo 1 >> /sys/devices/system/cpu/cpu1/online
now you can check on /proc/cpuinfo, top, or any utility to see the active cores on the system.
For disabling cores on boot permanently, try maxcpus=N as grub parameter.
Categories: Linux.
Scan for new Luns:
for HBA_SCAN in `ls /sys/class/scsi_host/`
do
echo “- – -” > /sys/class/scsi_host/${HBA_SCAN}/scan
done
print port WWN:
for PORT_SCAN in `ls /sys/class/fc_host/`
do
cat /sys/class/fc_host/${PORT_SCAN}/port_name
done
Print driver fields:
QLOGIC=`lsmod | grep qla | awk ‘{print $1}’| head -1`
EMULEX=`lsmod | grep lpfc | awk ‘{print $1}’| head -1`
if [ -n "$QLOGIC" ]
then
modinfo $QLOGIC 2>&1|egrep “version|author|description”
fi
if [ -n "$EMULEX" ]
then
modinfo $EMULEX 2>&1|egrep “version|author|description”
fi
Comments Off
Categories: Linux.
By default, bash will only log 500 lines of history without a timestamp. To correct this behaviour, you may want to increase the number of lines logged by bash and include a timestamp to it:
export HISTTIMEFORMAT='%F %T ' export HISTFILESIZE=80000 export HISTSIZE=80000
Comments Off
Categories: Linux.
The \1 can refer to a previously captured group even in the pattern:
grep -v “^\([[:alnum:]]\+\) \1$”
Note: This is not a general solution, just an ilustration.
Comments Off
Categories: Linux.