$ sudo apt-get install nodejs
$ sudo apt-get install npm
$ sudo npm install -g bower
Ese comando te devolverá la versión de Node.js que se ha instalado.
Create new project | |
$ symfony new my-project 2.8.0 | |
or | |
$ symfony new my-project lts | |
or | |
$ composer create-project symfony/framework-standard-edition my_project_name "2.8.*" | |
Check version Symfony | |
$ php app/console --version | |
or |
<?php | |
$datetime = new \DateTime('2012-10-10'); | |
$date = new DateTime('2000-01-01'); | |
echo $date->format('Y-m-d H:i:s'); | |
/*Get number of day */ | |
$numberDay = date('N'); | |
// Get current time in timestamp |
* Rendering the Form | |
{{ form_start(form) }} | |
{{ form_widget(form) }} | |
{{ form_end(form) }} | |
* Renders the HTML widget of a given field. If you apply this to an entire form or collection of fields, | |
each underlying form row will be rendered. | |
{# render a widget, but add a "foo" class to it #} | |
{{ form_widget(form.name, {'attr': {'class': 'foo'}}) }} |
<?php | |
/** | |
SF 2.8 | |
*/ | |
$fileTmpPath = $_FILES['job_send_your_resume']['tmp_name']['file']; | |
$fileTmpName = $_FILES['job_send_your_resume']['name']['file']; | |
$transport = \Swift_SmtpTransport::newInstance('smtp.gmail.com', 587,'tls') | |
->setUsername('***@*****.**') | |
->setPassword('********1'); |
Informacion del servidor | |
$ cat /etc/issue | |
$ uname --all | |
PPA | |
Personal Package Archive | |
$ sudo add-apt-repository ppa:linuxuprising/java | |
$ sudo apt update | |
$ apt-cache policy oracle-java10-installer | |
$ sudo apt install oracle-java10-installer |
<?php | |
include 'libraries/PhpExcelReader/excel_reader.php';// include the class | |
$fileName = '/home/user/vagrant/ubuntu14.04-64/projects/html/php/excel-read/files/Formato-Migracion-Account.xls'; | |
$data = new PhpExcelReader; | |
$data->read($fileName); | |
$dataBase = "database"; | |
$host = "xxxxx.amazonaws.com"; | |
$port = "3306"; |
# | |
$ ip addr show | |
$ ip addr show | grep "inet" | |
$ ip addr show | grep "inet 192" | |
Utilidad que informa de la versión de la base estándar de Linux (LSB) | |
La base estándar de Linux (http://www.linuxbase.org/) es un núcleo estándar del que pueden depender programas externos escritos para Linux. | |
La orden lsb-release es una herramienta sencilla para ayudar a identificar la distribución de Linux que se está usando y si cumple con la base estándar de Linux. El comportamiento acorde a LSB no se informará a menos que los metapaquetes necesarios estén instalados. | |
A la vez que se pretende que la usen los paquetes de LSB, esta orden también puede ser útil para distinguir programáticamente entre una instalación de Debian pura y una distribución derivada. |
Comando principal es VBoxManage, estara acompañado de subcomandos | |
Para mostrar una lista de las máquinas virtuales instaladas usamos: | |
$ VBoxManage list vms | |
$ VBoxManage list vms -l | |
<?php | |
// Using error_log() with print_r() to gracefully debug PHP | |
error_log(print_r($number,true)); | |