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
| ## Instalar git | |
| [Descargar](https://git-scm.com/downloads) | |
| ## Configurar git | |
| ``` | |
| git config --global user.name "John Doe" | |
| git config --global user.email johndoe@example.com | |
| ``` |
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
| # Crea directorio html | |
| sudo mkdir -p /var/www/intranet.osinfor.gob.pe/html | |
| # Crea logs dir | |
| sudo mkdir -p /var/www/intranet.osinfor.gob.pe/log | |
| # Next, assign ownership of the html directory with the $USER environmental variable: | |
| sudo chown -R $USER:$USER /var/www/intranet.osinfor.gob.pe/html | |
| # Make sure that your web root has the default permissions set: |
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
| Install-Package Microsoft.AspNet.WebApi.Cors | |
| nableCorsAttribute cors = new EnableCorsAttribute("*", "*", "*"); | |
| config.EnableCors(cors); |
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
| <script> | |
| window.onbeforeunload = function (event) { | |
| var message = 'Important: Please click on \'Save\' button to leave this page.'; | |
| if (typeof event == 'undefined') { | |
| event = window.event; | |
| } | |
| if (event) { | |
| event.returnValue = message; |
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
| sudo locale-gen es_ES es_ES.utf8 | |
| sudo dpkg-reconfigure locales | |
| sudo update-locale LANG=es_ES.UTF-8 | |
| /etc/php/7.2/apache2/php.ini | |
| date.timezone = America/Lima |
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
| #!/bin/sh | |
| if [ "$1" -eq 72 ]; then | |
| echo "Cambiando a PHP 7.2" | |
| sudo a2dismod php5.6 | |
| sudo a2enmod php7.2 | |
| sudo service apache2 restart | |
| sudo update-alternatives --set php /usr/bin/php7.2 | |
| sudo update-alternatives --set phar /usr/bin/phar7.2 | |
| sudo update-alternatives --set phar.phar /usr/bin/phar.phar5.16 |
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
| sudo mysql | |
| use mysql; | |
| UPDATE mysql.user SET plugin = "mysql_native_password" WHERE User="root"; | |
| UPDATE user SET authentication_string=PASSWORD("root") WHERE User="root"; | |
| flush privileges; exit |
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
| nano /path/to/create-sh.sh | |
| #!/bin/bash | |
| chmod +x /path/to/create-sh.sh | |
| mv /path/to/create-sh.sh /usr/local/bin/create-sh |
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
| <?php | |
| $mysqli = new mysqli("66.147.244.210", "incatra5_msoto", "#Hacker147*", "incatr$ | |
| //$mysqli = new mysqli("localhost", "minam", "minam", "educacion"); | |
| /* comprobar la conexión */ | |
| if ($mysqli->connect_errno) { | |
| printf("Conexión fallida: %s\n", $mysqli->connect_error); | |
| exit(); | |
| } | |
| /* comprobar si el servidor sigue vivo */ |
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
| $.ajax({ | |
| dataType : "text/plain", | |
| contentType: "application/json;", | |
| type: "post", | |
| url: "http://172.16.8.22/AgroRuralMovil/SvcAsistencia.svc/ConsultaAsistencia", | |
| data: {"cDni":"44069967","dFechaInicio":"2012-01-01","dFechaFin":"2017-07-04","iOpcion":1}, | |
| success: function(e){ | |
| console.log(e); | |
| }, | |
| error: function(e){ |