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
function isValid(str) { | |
var regex = new RegExp("^[0-9]{3}-?[0-9]{7}-?[0-9]{1}$"); | |
if (!regex.test(str)) { | |
return false; | |
} | |
str = str.replace(/-/g, ''); |
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
{ | |
"apps": [{ | |
"name": "laravel-app", | |
"script": "artisan", | |
"args": ["serve", "--host=0.0.0.0", "--port=3333"], | |
"instances": "1", | |
"wait_ready": true, | |
"autorestart": false, | |
"max_restarts": 1, | |
"interpreter" : "php", |
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
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: echoserver | |
labels: | |
app: echoserver | |
spec: | |
replicas: 3 | |
selector: |
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
FROM php:7.4-fpm-alpine | |
# @see https://hub.docker.com/r/jpswade/php7.4-fpm-alpine | |
MAINTAINER Agent Software <dev@agentsoftware.net> | |
# Install gd, iconv, mbstring, mysql, soap, sockets, zip, and zlib extensions | |
# see example at https://hub.docker.com/_/php/ | |
RUN apk add --update \ | |
$PHPIZE_DEPS \ | |
freetype-dev \ | |
git \ |
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
/** | |
* Convert form to json | |
* @param {Event} event evento del formulario | |
*/ | |
const FormToJson = async (event) => { | |
event.preventDefault(); | |
const data = new FormData(event.target) | |
const values = Object.fromEntries(data.entries()); | |
return values | |
} |