Skip to content

Instantly share code, notes, and snippets.

View elialejandro's full-sized avatar
😋
Be happy

Eli Alejandro elialejandro

😋
Be happy
  • Chiapas
View GitHub Profile
@elialejandro
elialejandro / Form.vue
Created July 5, 2024 05:26
Intro Vue 3
<script setup lang="ts">
import Button from '@/base-components/Button';
import { FormInput, FormLabel } from '@/base-components/Form';
import { reactive } from 'vue';
const form = reactive({
name: '',
email: '',
password: '',
});
@elialejandro
elialejandro / index.html
Created September 26, 2019 17:29
Demo, Vue + Axios
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<div id="app">
{
"nombreApp" : "Componentes",
"rutas" : [
{
"ruta" : "alert",
"icon" : "add_alert",
"texto": "Alertas"
}
]
}
<?php
// Application/Entity/AuthUser.php
namespace Application\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
*/
@elialejandro
elialejandro / AuthController.php
Last active August 5, 2018 02:42
Example Zend Form and Ajax
<?php
namespace Application\Controller;
use Application\Form\LoginForm;
use Zend\Authentication\AuthenticationService;
use Zend\Mvc\Controller\AbstractActionController;
use Zend\View\Model\JsonModel;
use ZF\ApiProblem\ApiProblem;
use ZF\ApiProblem\ApiProblemResponse;
<!doctype html>
<html lang="es">
<head>
<meta charset="utf-8">
<title>Angular</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<?php
include 'connect.php';
if (isset($_POST['add'])) {
$studentId = $_POST['studentId'];
$firstname = $_POST['firstname'];
$middlename = $_POST['middlename'];
$lastname = $_POST['lastname'];
$contactnumber = $_POST['contactnumber'];
@elialejandro
elialejandro / AutoinstallMYSQL.sh
Last active July 7, 2020 17:08
MySQL 5.7 No directory, logging in with HOME=/
# Install MySQL
mysql_config_file="/etc/mysql/my.cnf"
echo "mysql-server mysql-server/root_password password secret" | sudo debconf-set-selections
echo "mysql-server mysql-server/root_password_again password secret" | sudo debconf-set-selections
apt-get -y install mysql-client mysql-server
sed -i "s/bind-address\s*=\s*127.0.0.1/bind-address = 0.0.0.0/" ${mysql_config_file}
usermod -d /var/lib/mysql/ mysql
@elialejandro
elialejandro / JwtAuth.php
Last active October 10, 2017 01:48
JwtAuth para Symfony usando características de PHP 5.5 o superior
<?php
namespace AppBundle\Services;
use Doctrine\ORM\EntityManagerInterface;
use Firebase\JWT\JWT;
class JwtAuth
{
protected $em;