miércoles, octubre 10, 2012

Cuadrar Ventanas Mosaico en Openbox

Editar el archivo rc.xml

(text Editor) ~/.config/openbox/rc.xml

Y pegar el siguiente texto en la sección de KeyBindings:


<!-- Keybindings for window tiling -->
    <keybind key="W-Left">        # HalfLeftScreen
      <action name="UnmaximizeFull">
      <action name="MoveResizeTo">
        <x>0</x>
        <y>0</y>
        <height>100%</height>
        <width>50%</width>
      </action>
    </action></keybind>
    <keybind key="W-Right">        # HalfRightScreen
      <action name="UnmaximizeFull">
      <action name="MoveResizeTo">
        <x>-0</x>
        <y>0</y>
        <height>100%</height>
        <width>50%</width>
      </action>
    </action></keybind>
    <keybind key="W-Up">        # HalfUpperScreen
      <action name="UnmaximizeFull">
      <action name="MoveResizeTo">
        <x>0</x>
        <y>0</y>
        <width>100%</width>
        <height>50%</height>
      </action>
    </action></keybind>
    <keybind key="W-Down">        # HalfLowerScreen
      <action name="UnmaximizeFull">
      <action name="MoveResizeTo">
        <x>0</x>
        <y>-0</y>
        <width>100%</width>
        <height>50%</height>
      </action>
    </action></keybind>
    <keybind key="C-Left">        # QuartLowerLeftScreen
      <action name="UnmaximizeFull">
      <action name="MoveResizeTo">
        <x>0</x>
        <y>-0</y>
        <width>50%</width>
        <height>50%</height>
      </action>
    </action></keybind>
    <keybind key="C-Right">        # QuartUpperRightScreen
      <action name="UnmaximizeFull">
      <action name="MoveResizeTo">
        <x>-0</x>
        <y>0</y>
        <width>50%</width>
        <height>50%</height>
      </action>
    </action></keybind>
    <keybind key="C-Up">        # QuartUpperLeftScreen
      <action name="UnmaximizeFull">
      <action name="MoveResizeTo">
        <x>0</x>
        <y>0</y>
        <width>50%</width>
        <height>50%</height>
      </action>
    </action></keybind>
    <keybind key="C-Down">        # QuartLowerRightScreen
      <action name="UnmaximizeFull">
      <action name="MoveResizeTo">
        <x>-0</x>
        <y>-0</y>
        <width>50%</width>
        <height>50%</height>
      </action>
    </action></keybind>
    <keybind key="A-Right">        # FullScreen
      <action name="UnmaximizeFull">
      <action name="MoveResizeTo">
        <x>0</x>
        <y>0</y>
        <width>100%</width>
        <height>100%</height>
      </action>
    </action></keybind>
    <keybind key="A-Left">        # MiddleScreen
      <action name="UnmaximizeFull">
      <action name="MoveResizeTo">
        <x>center</x>
        <y>center</y>
        <width>50%</width>
        <height>50%</height>
      </action>
    </action></keybind>

miércoles, junio 20, 2012

OpenEJB 4.0.0 + Debian 6 + Running Tomcat 6 installed from repository

Siga las instrucciones del sitio web oficial del proyecto Apache TomEE (OpenEJB)

http://openejb.apache.org/tomcat.html

Al momento de la instalación se presentaran problemas de permisos de directorios y archivos, para solventar esto debemos otrogar permisos de escritura a los siguientes directorios y archivos:

sudo chmod 777 /var/lib/tomcat6/conf/server.xml
sudo chmod 777 /usr/share/tomcat6/bin/catalina.sh
sudo chmod 777 /usr/share/tomcat6/bin/catalina.bat (este archivo no existe, debemos crearlo antes)
sudo chmod 777 /usr/share/tomcat6/lib
sudo chmod 777 /etc/tomcat

Una vez realizada la instalación de manera satisfactoria debemos reasignar los permisos anteriores a los directorios y archivos:

sudo chmod 644 /var/lib/tomcat6/conf/server.xml
sudo chmod 755 /usr/share/tomcat6/bin/catalina.sh
sudo chmod 755 /usr/share/tomcat6/bin/catalina.bat
sudo chmod 755 /usr/share/tomcat6/lib
sudo chmod 755 /etc/tomcat

martes, marzo 27, 2012

Trasladar todas las Ramas de un Repositorio Git a otro

#!/bin/bash
for remote in `git branch -r `; do git checkout --track $remote; done

#!/bin/bash
git remote add new-origin git@my_gitosis_server.com:my_new_repos.git

#!/bin/bash
git push --all new_remote

martes, enero 10, 2012

Crear instancia de Trac apuntando a un repositorio Subversion


#!/bin/bash
PROY=$1
if [ -z "$1" ];
then
        echo Por favor, introduzca el nombre del proyecto a crear
        read PROY
fi

ADMIN_USERNAME=$2
if [ -z "$2" ];
then
        echo Por favor, introduzca el usuario administrador del proyecto
        read ADMIN_USERNAME
fi

SVN=/srv/svn
if [ -d $SVN ]; then
        echo El directorio $SVN existe, continuamos con el proyecto
else
        mkdir $SVN
fi

#Creamos el svn

        mkdir $SVN/$PROY
        mkdir /tmp/$PROY
        mkdir /tmp/$PROY/trunk
        mkdir /tmp/$PROY/branches
        mkdir /tmp/$PROY/tags

#Importamos los directorios al SVN

        svnadmin create $SVN/$PROY --fs-type fsfs
        svn import /tmp/$PROY file://$SVN/$PROY -m "Inicio"

#Borramos directorios temporales

        rm -rf /tmp/$PROY

#Cambiamos permisos y propietario de los ficheros

        find $SVN/$PROY -type f -exec chmod 660 {} \;
        find $SVN/$PROY -type d -exec chmod 2770 {} \;
        chown -R www-data.www-data $SVN/$PROY

#Comprobamos si existe el directorio $DIR_TRAC , si no lo creamos

 DIR_TRAC=/srv/trac
 if [ -d $DIR_TRAC ]; then
  echo El directorio $DIR_TRAC existe, continuamos con el proyecto
 else
  mkdir $DIR_TRAC
 fi

#Importamos el SVN al TRAC y agregamos un administrador

        trac-admin $DIR_TRAC/$PROY initenv
  trac-admin $DIR_TRAC/$PROY permission add developer TRAC_ADMIN
  trac-admin $DIR_TRAC/$PROY permission add $ADMIN_USERNAME developer


#Cambiamos los permisos a los ficheros y directorios del trac

        find $DIR_TRAC/$PROY -type f -exec chmod 660 {} \;
        find $DIR_TRAC/$PROY -type d -exec chmod 2770 {} \;
        chown -R www-data.www-data $DIR_TRAC/$PROY