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
# Este archivo debe de ir en /etc/apache2/vhosts | |
# Y se usa para cada proyecto. | |
# El URL del DocumentRoot apunta hacia la carpeta donde está el repo | |
# y no precisamente donde está el htdocs de Apache (/Library/WebServer/Documents). | |
# | |
# Recuerda agregar el dominio a la tabla de hosts (/etc/hosts) | |
<VirtualHost *:80> | |
DocumentRoot "/Users/fmagrosoto/Documents/Repositorios/prueba" | |
ServerName prueba.local |
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
alias ll='ls -al' | |
alias repos='clear && cd ~/Documents/dIGITAE/Repositorios && ll && say Listos pachar código' | |
export CLICOLOR=1 | |
export LSCOLORS=ExFxBxDxCxegedabagacad | |
alias puertos='sudo lsof -PiTCP -sTCP:LISTEN' | |
alias compara='git remote show origin' | |
alias c='clear' | |
alias cl='clear && ll' | |
alias st='git status' | |
alias iplocal='ifconfig | grep "inet " | grep -v 127.0.0.1 | cut -d\ -f2' |
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=""> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title></title> | |
<!-- Disable tap highlight on IE --> |
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
// Declarar una variable global para reusarlo a lo largo del script. | |
// Esta variable contendrá el objeto XMLHttpRequest. | |
var httpRequest; | |
/** | |
* FUNCIÓN PARA ACTIVAR AJAX Y HACER LA LLAMADA ASÍNCRONA. | |
* @uses Esta función se dispara al cargarse todos los elementos de la página | |
* @return Void | |
*/ | |
function llamadaAjax() { |
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
web: vendor/bin/heroku-php-apache2 web/ |
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
{ | |
"name":"fmagrosoto/proyecto", | |
"description":"desripción de una sola línea", | |
"authors": [ | |
{ | |
"name": "Fernando Magrosoto", | |
"email": "[email protected]", | |
"homepage": "http://www.fmagrosoto.com", | |
"role": "Main Developer" | |
} |
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="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 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
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 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
// 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 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 | |
$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, |