This file contains 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
web: vendor/bin/heroku-php-apache2 web/ |
This file contains 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
{ | |
"name":"fmagrosoto/proyecto", | |
"description":"desripción de una sola línea", | |
"authors": [ | |
{ | |
"name": "Fernando Magrosoto", | |
"email": "fmagrosoto@gmail.com", | |
"homepage": "http://www.fmagrosoto.com", | |
"role": "Main Developer" | |
} |
This file contains 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="es"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Ordena JSON</title> | |
<meta name="description" content="Ordenar un JSON en Javascript"> | |
<meta name="author" content="Fernando Magrosoto V."> | |
<style> | |
body { | |
background-color: white; |
This file contains 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
var gulp = require('gulp'); | |
gulp.task('bootCss',function(){ | |
gulp.src('bower_components/bootstrap/dist/css/bootstrap.min.css') | |
.pipe(gulp.dest('Dist/css/')); | |
}); | |
gulp.task('bootJs',function(){ | |
gulp.src('bower_components/bootstrap/dist/js/bootstrap.min.js') | |
.pipe(gulp.dest('Dist/js/')); |
This file contains 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
// Se trata de usar una llamada a AJAX a través | |
// de Dominios diferentes (Cross Domain) | |
// y con una petición JSON para extraer información | |
// de una base de datos (por ejemplo MySQL). | |
/** | |
* FUNCIÓN ANÓNIMA PARA HACER LA LLAMADA Y EXTRAER INFORMACIÓN | |
* @author Fernando Magrosoto V. (@fmagrosoto) | |
* @version 1.0 | |
* @returns {void} Sin valores devueltos |
This file contains 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 | |
$fileName = $_FILES['afile']['name']; | |
$fileType = $_FILES['afile']['type']; | |
$fileContent = file_get_contents($_FILES['afile']['tmp_name']); | |
$dataUrl = 'data:' . $fileType . ';base64,' . base64_encode($fileContent); | |
$json = json_encode(array( | |
'name' => $fileName, | |
'type' => $fileType, | |
'dataUrl' => $dataUrl, |
This file contains 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
// Fecha extraída desde una BD y en formato MySQL | |
var fechaMySQL = "2015-07-23 10:09:01"; | |
console.log('La fecha original es: '+fechaMySQL); | |
// Función para formatear la fecha | |
function formFecha(f){ | |
// Primero, la partimos en dos: | |
// [0] es la fecha, [1] es la hora |
This file contains 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> | |
<head> | |
<meta charset="utf-8"> | |
<title>Paginador con JSON</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"> | |
</head> | |
<body> | |
<div class="container"> |
This file contains 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
/** | |
* MOSTRAR FECHA DE HOY | |
* | |
* Fecha de hoy en el siguiente formato | |
* <i>nDia dia 'de' Nmes 'de' agno</i> | |
* @author Fernando Magrosoto V. | |
* @param {string} contenedor El ID del contenedor donde poner la fecha | |
*/ | |
var class_FechaHoy = function(contenedor) | |
{ |
This file contains 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> | |
<head> | |
<meta charset='UTF-8' /> | |
<title>Lista de Esados de la República Mexicana</title> | |
</head> | |
<body> | |
<h1>Lista de Estados de la República Mexicana</h1> | |
<label>Estado de la República</label> | |
<select name="estado"> |