public function testPartialJsonResponse()
{
$response = $this->json('GET', '/api/users/1');
$response
->assertStatus(200)
->assertJsonFragment([
'name' => 'Anakin Skywalker',
]);
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
swal({ | |
title: 'Bom trabalho!', | |
text: 'O seu pedido foi cadastrado com sucesso!', | |
icon: 'success', | |
button: 'Imprimir', | |
}) | |
.then(function () { | |
window.location.href = '/cadastro/servico' | |
}) |
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 Crawler = require('crawler') | |
const baseUrl = 'https://animes.zlx.com.br' | |
const startUrl = baseUrl+'/exibir/67/6561/shingeki-no-kyojin-01' | |
const crawler = new Crawler({ | |
maxConnections: 10, | |
skipDuplicates: true, | |
callback: (error, response, done) => { | |
const $ = response.$ | |
const title = $('title').text() |
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 fetch = require('node-fetch') | |
const moment = require('moment') | |
const { delay } = require('bluebird') | |
const { find, pipe, prop, propEq } = require('ramda') | |
const estimateUberPrices = async () => { | |
const addresses = [ | |
{ | |
start_latitude: -23.631316, | |
start_longitude: -46.668384, |
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
ZSH_THEME="spaceship" | |
plugins=(git zsh-autosuggestions) | |
function artisan { | |
( php artisan $* ) | |
} | |
function phpunit { | |
( vendor/bin/phpunit $* ) |
<?php
use Illuminate\Database\Eloquent\Model;
use TeamTNT\TNTSearch\Facades\TNTSearch;
trait Searchable
{
/**
* Auto update search index using model events.
- AutoFileName
- CodeComplice
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
setInterval(() => document.querySelectorAll('.jobs-list li.failed .action-button--restart').forEach(button => button.click()), 60000) |