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
{ | |
"trailingComma": "es5", | |
"tabWidth": 4, | |
"semi": true, | |
"singleQuote": true, | |
"printWidth": 80 | |
} |
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
semi: ['error', 'always'], | |
quotes: ['error', 'single'], | |
indent: ['error', 4], //de acordo com sua preferência | |
'comma-spacing': ['error', { before: false, after: true }], |
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
var path = require('path') | |
module.exports = { | |
'config': path.resolve('database', 'config', 'config.js'), | |
'migrations-path': path.resolve('database', 'migrations'), | |
'models-path': path.resolve('database', 'models'), | |
'seeders-path': path.resolve('database', 'seeders'), | |
} |
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
formatar_data = (d) =>{ | |
const date = new Date(d); | |
const formatter = Intl.DateTimeFormat('pt-BR', { | |
timeZone: 'UTC', | |
dateStyle: "short" | |
}); | |
return formatter.format(date); |
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
var users = [ | |
{ | |
name: "Alexandre", | |
status: "ativo", | |
}, | |
{ | |
name: "Joao", | |
status: "ativo", | |
}, | |
{ |
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
<?php | |
use PHPMailer\PHPMailer\SMTP; | |
function send(array $data) | |
{ | |
$email = new PHPMailer\PHPMailer\PHPMailer; | |
try { | |
$email->SMTPDebug = SMTP::DEBUG_SERVER; //Enable verbose debug output |
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
<?php | |
header('Access-Control-Allow-Origin: *'); | |
header('Access-Control-Allow-Credentials: true'); | |
header('Access-Control-Allow-Methods: GET,HEAD,OPTIONS,POST,PUT'); | |
header('Access-Control-Allow-Headers:X-Requested-With, Content-Type'); | |
if ('OPTIONS' === $_SERVER['REQUEST_METHOD']) { | |
die('error'); | |
} |
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
<?php | |
// errado | |
namespace app\helpers; | |
class Uri | |
{ | |
public static function get($type): string | |
{ | |
return parse_url($_SERVER['REQUEST_URI'][$type]); | |
} |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
</head> | |
<body> | |
<div x-data="data()"> |
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
<snippet> | |
<content><![CDATA[ | |
declare(strict_types=1); | |
namespace App${TM_FILEPATH/(?:.*app)|(\/)([^\/]+)(?=\/)|(?:\/[^\/]+\.php$)/(?1:\\$^N:$^N)/g}; | |
class ${1:${TM_FILENAME/(.+)\..+|.*/$1/:name}} | |
{ | |
} | |
]]></content> |
OlderNewer