This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function addHttp($url) { | |
if (filter_var($url, FILTER_VALIDATE_URL) === false) { | |
$url = "http://" . $url; | |
} | |
return $url; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function limit_words($string, $word_limit) { | |
$words = explode(' ', $string); | |
return implode(' ', array_slice($words, 0, $word_limit)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "Ingrese el dominio local" | |
read sn | |
echo "ingrese el directorio del proyecto" | |
read www | |
echo "ingrese el repo a clonar" | |
read clone | |
echo "Creando el VirtualHost" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
www=/home/putencio/Proyectos/wp | |
echo "Ingrese el dominio local" | |
read sn | |
# Create VirtualHost config in /etc/apache2/site-available/ | |
echo "<VirtualHost *:80> | |
ServerAdmin [email protected] | |
ServerName $sn | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Zend Framework 2 Tool | |
========================= | |
**ZFTool** instalar dentro de las dependencias del proyecto Zend Framework 2 . | |
## Configurar la instalación | |
* Run `composer require zendframework/zftool:dev-master` | |
* Habilitar el modulo ZFTool en **application.config.php** | |
## Features |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Para ver si mongodb está disponible en los modulos de php ejecutamos esto en consola | |
~ /usr/bin/env php -m | |
2. Instalación de dependencias para el drive de mongo | |
sudo apt-get update | |
sudo pecl install mongo | |
3. Modifico 1ero el php.ini del apache | |
~ sudo vi /etc/php5/apache2/php.ini |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Instalación | |
1. Import the public key used by the package management system. | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 | |
2. Create a /etc/apt/sources.list.d/mongodb-org-3.0.list file for MongoDB. | |
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list | |
3. Reload local package database |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -sS https://getcomposer.org/installer | php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Instalar meld | |
sudo apt-get install meld | |
2. Configurar git: | |
git config --global merge.tool meld | |
3. Cuando tengas conflictos: | |
git mergetool |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 . echo $ANDROID_HOME | |
2. echo $PATH | |
3. export ANDROID_HOME=/renzo/Android/Sdk | |
4. echo $ANDROID_HOME |