Skip to content

Instantly share code, notes, and snippets.

View porfidev's full-sized avatar
⚛️
Now coding react-native

Porfirio Chávez porfidev

⚛️
Now coding react-native
View GitHub Profile
@porfidev
porfidev / Constantes.php
Last active January 28, 2021 22:01
PHPMailer Tutorial 2019
<?php
define('EMAIL_SENDER', '[email protected]');
define('EMAIL_PASSWORD', 'your-secret-password');
@porfidev
porfidev / index.html
Last active March 9, 2019 01:05
Tutorial para mostrar imagenes en el navegador a partir de un input file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Image Review</title>
<link href="styles.css" rel="stylesheet" />
</head>
<body>
<div class="main-container">
<div class="input-container">
function showMessage(message){
const processDiv = document.getElementById('process');
processDiv.innerHTML = message;
processDiv.style.display = 'block';
}
function hideMessage() {
const processDiv = document.getElementById('process');
processDiv.style.display = 'none';
}
@porfidev
porfidev / jquery01.html
Created September 19, 2019 17:51
Jquery Tutorial #1 Mostrar y Ocultar DIV con animación
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Tutorial jQuery Remasterizado</title>
<script src="http://code.jquery.com/jquery-1.8.0.min.js"></script>
<script>
var pagina = $(document);
pagina.on("ready", animar);
@porfidev
porfidev / index.html
Created September 19, 2019 18:14
Refactor de tutorial #1 Mostrar y Ocultar Divs
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Tutorial jQuery Remasterizado</title>
<link href="style.css" rel="stylesheet">
</head>
<body>
<button id="showContainer" type="button">Mostrar mensaje</button>
<button id="hideContainer" type="button">Ocultar mensaje</button>
@porfidev
porfidev / sumar-radio-button-javascript.html
Created October 4, 2019 16:46
Como sumar los radio buttons de un formulario con Javascript en 2019
<html>
<head>
<title>CAFETERIA</title>
<meta charset="utf-8" />
<style>
body {
background-color: #e1e637;
}
h1 {
color: #ff090e;
@porfidev
porfidev / httpGetRequest.php
Created October 17, 2019 22:01
Peticiones HTTP get sin Curl
<?php
include('vendor/rmccue/requests/library/Requests.php');
Requests::register_autoloader();
$url = 'https://jsonplaceholder.typicode.com/posts';
$response = Requests::get($url);
@porfidev
porfidev / httpPostRequest.php
Created October 17, 2019 22:08
Peticiones HTTP post sin Curl
<?php
include('vendor/rmccue/requests/library/Requests.php');
Requests::register_autoloader();
$url = 'https://jsonplaceholder.typicode.com/posts';
$postData = array([
'title' => 'Hola Mundo',
@porfidev
porfidev / tutorial-formato-numeros.js
Created October 25, 2019 15:38
Complemento para el tutorial del video https://youtu.be/xcFBSCcMfbc
import React from "react";
import "./App.css";
function FormatNumber({ number }) {
return (
<span style={{ color: "red" }}>
{new Intl.NumberFormat("ES-MX", {
style: "currency",
currency: "MXN"
}).format(number)}
@porfidev
porfidev / tutorial-cambio-imagenes_index.html
Last active November 24, 2019 06:54
jQuery Tutorial #5 👍Como cambiar la imagen de fondo
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Full Height Background Image | elporfirio.com</title>
<style>
body, html {
height: 100%;
margin: 0;
}