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
version: '3.2' | |
services: | |
mysql: | |
image: mysql:8.0 | |
container_name: mysql | |
hostname: mysql | |
command: --default-authentication-plugin=mysql_native_password | |
environment: | |
- MYSQL_DATABASE=opencart | |
- MYSQL_ROOT_PASSWORD=change_to_secure_password |
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 | |
echo "Hello World"; |
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
const players = [ | |
{ name: 'Rodrigo', kills: 12 }, | |
{ name: 'Vitor', kills: 9 }, | |
{ name: 'Camila', kills: 17 }, | |
{ name: 'Amanda', kills: 6 } | |
]; | |
const orderAsc = (a, b) => a.kills - b.kills; | |
const orderDesc = (a, b) => b.kills - a.kills; |
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
// considerando o array abaixo | |
const arr = [4, 7, 10, 82, 35]; | |
// Opção 1: Pelo tamanho do array | |
let first = arr[0]; | |
let last = arr[arr.length-1]; | |
// Opção 2: Com shift(), pop() e Spread operator | |
let first = [...arr].shift(); | |
let last = [...arr].pop(); |
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 | |
$json = json_decode(file_get_contents('php://input')); | |
if (isset($json->SubscribeURL)){ | |
file_get_contents($json->SubscribeURL); | |
} | |
file_put_contents("./cron-" . time() . '.txt', json_encode($json)); |
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 | |
namespace App\Http\Requests\Traits; | |
use Illuminate\Http\JsonResponse; | |
use Illuminate\Http\Exceptions\HttpResponseException; | |
use Illuminate\Contracts\Validation\Validator; | |
use Illuminate\Validation\ValidationException; | |
trait FailedValidationTrait |
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
- Seu Facebook Business | |
--- Conta 1 | |
------ Para divulgar o produto A | |
------ Pixel da conta 1 | |
------ Página A da conta 1 | |
--- Conta 2 | |
------ Para divulgar o produto B | |
------ Pixel da conta 2 | |
------ Página da conta 2 |
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
const mix = require('laravel-mix'); | |
const tailwindcss = require('tailwindcss'); | |
const glob = require("glob-all"); | |
const PurgecssPlugin = require("purgecss-webpack-plugin"); | |
class TailwindExtractor { | |
static extract(content) { | |
return content.match(/[A-Za-z0-9-_:\/]+/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
var checkout = new Vue({ | |
el: '#checkout', | |
data: { | |
pagseguro : { | |
toggle : false | |
}, | |
products : { | |
toggle : false | |
}, |
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 | |
$uf = [ | |
'Acre' => 'Acre', | |
'Alagoas' => 'Alagoas', | |
'Amapá' => 'Amapá', | |
'Amazonas' => 'Amazonas', | |
'Bahia' => 'Bahia', | |
'Ceará' => 'Ceará', | |
'Distrito Federal' => 'Distrito Federal', |
NewerOlder