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 / inicio.php
Created April 16, 2014 15:30
Código utilizado en el tutorial de Mi primera App de Twitter
<?php
/**
* Created by PhpStorm.
* User: elporfirio
* Date: 14/04/14
* Time: 08:09 PM
*/
require_once("twitteroauth/twitteroauth.php");
@porfidev
porfidev / array sort primitive
Created December 29, 2014 16:24
Crea un arreglo, donde se debe tomar la fecha mas reciente y la final
<?php
/**
* Created by PhpStorm.
* User: Porfirio
* Date: 29/12/2014
* Time: 09:22 AM
*/
$array = array(
@porfidev
porfidev / aberracion verificacion.js
Last active August 29, 2015 14:14
Codigo que no se por que surgio, pero xD fue hace años.
function verificar() {
//Verifica la existencia de los elementos
if (document.formaltas.curp.value.length == 0) {
alert('Falta ingresar el Curp')
document.formaltas.curp.focus()
}
else {
v1 = 0;
if (document.formaltas.nombre.value.length == 0) {
alert('Falta el Nombre del Empleado')
@porfidev
porfidev / formulario.php
Created May 23, 2015 13:47
Subir archivos y guardarlos con Class Upload
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body>
<form action="procesarArchivo.php" method="post" enctype="multipart/form-data">
<input type="file" name="imagen" id="imagen"/>
<button type="submit">Cargar Imagen</button>
@porfidev
porfidev / algo.html
Created May 27, 2015 15:01
JS para animacion rapida con estilos CSS
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<style>
.imagenloca{
width: 100px;
height: 100px;
background-color: #FCA;
@porfidev
porfidev / app.js
Created June 9, 2015 15:45
modal-test
/**
* Created by elporfirio on 09/06/2015.
*/
angular.module('BootstrapTest', ['ngRoute'])
.directive('modalLoginForm', function(){
return {
restrict: 'E',
templateUrl: 'modal-login.html',
controller: 'LoginUserController',
link: function($scope, $element, $attributes) {
@porfidev
porfidev / formulario.html
Created June 15, 2015 22:04
Un switch básico de HTML y PHP
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body>
<form name="leformulario" id="leformulario" action="leguardado.php" method="post">
<label for="miopcionelegida1">
Opcion valor 1
@porfidev
porfidev / class.mysql.php
Created July 15, 2015 16:20
selects nitramara
<?php
/**
* Created by PhpStorm.
* User: elporfirio
* Date: 15/07/2015
* Time: 10:44 AM
*/
class MySQL
{
@porfidev
porfidev / functions.php
Last active August 29, 2015 14:26
Paginador PHP con PDO
<?php
/**
* Created by PhpStorm.
* User: elporfirio
* Date: 01/08/15
* Time: 8:35
*/
function conexionBase(){
@porfidev
porfidev / ultimos_tweets.php
Created August 8, 2015 17:01
API Twitter 2015: Mostrar los últimos 10 tweets de un usuario
<?php
/**
* Created by PhpStorm.
* User: elporfirio
* Date: 08/08/15
* Time: 10:56
*/
require "twitteroauth-master/autoload.php";