Gist de bienvenida para el curso 'el periodista como programador' para la UNIR.
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
docker volume create mysql-db-data | |
docker run -p 33060:3306 --name mysql-db -e MYSQL_ROOT_PASSWORD=secret --mount src=mysql-db-data,dst=/var/lib/mysql mysql | |
docker exec -it mysql-db mysql -p | |
mysql> create database demo; | |
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
cat DUMPFILE | docker exec -i CONTAINER pg_restore -U postgres -d 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
module.exports = url => url | |
.split('?')[1] | |
.split('&') | |
.map(function(f){ return f.split('=')[0] + ',' + f.split('=')[1]; }) | |
.join('\n'); |
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
<select name="provincias" id="provincias"> | |
<option value="">----</option> | |
<option value="ES_C">A Coruña</option> | |
<option value="ES_AB">Albacete</option> | |
<option value="ES_A">Alicant</option> | |
<option value="ES_AL">Almería</option> | |
<option value="ES_VI">Araba</option> | |
<option value="ES_O">Asturias</option> | |
<option value="ES_AV">Ávila</option> | |
<option value="ES_BA">Badajoz</option> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyB4J7IBYD0FnBC6oV4qZikOZxdKYn-vyrI&libraries=places"></script> | |
<title>Get photo from google Maps for a location</title> | |
<script src="https://code.jquery.com/jquery-1.12.2.js" integrity="sha256-VUCyr0ZXB5VhBibo2DkTVhdspjmxUgxDGaLQx7qb7xY=" crossorigin="anonymous"></script> | |
<script> | |
$(function(){ |
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
Html para vincular archivos: | |
<img src="https://i.ytimg.com/vi/Bor5lkRyeGo/hqdefault.jpg"> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> |
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
<blockquote>Html da <strong>estructura</strong> al texto.</blockquote> |
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
Esto es una archivo html |
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 | |
// general settings | |
error_reporting(0); | |
ErrorHandler::register(false); | |
$app->register(new Silex\Provider\MonologServiceProvider(), array( | |
'monolog.logfile' => './log.log' | |
)); | |
// in debug mode add log to file |
NewerOlder