Skip to content

Instantly share code, notes, and snippets.

View flyingluscas's full-sized avatar
🏠
Working from home

fly flyingluscas

🏠
Working from home
View GitHub Profile
public function testPartialJsonResponse()
{
    $response = $this->json('GET', '/api/users/1');

    $response
        ->assertStatus(200)
        ->assertJsonFragment([
            'name' => 'Anakin Skywalker',
 ]);
@flyingluscas
flyingluscas / sweetalert.js
Created October 15, 2017 19:10
Sweetalert Example
swal({
title: 'Bom trabalho!',
text: 'O seu pedido foi cadastrado com sucesso!',
icon: 'success',
button: 'Imprimir',
})
.then(function () {
window.location.href = '/cadastro/servico'
})
@flyingluscas
flyingluscas / CrawlerAnimes.js
Created March 31, 2017 17:48
Crawler Animes
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()
@flyingluscas
flyingluscas / index.js
Created August 5, 2018 22:28
Uber Price Estimates
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,
@flyingluscas
flyingluscas / .zshrc
Last active August 15, 2018 13:15
My Terminal Settings
ZSH_THEME="spaceship"
plugins=(git zsh-autosuggestions)
function artisan {
( php artisan $* )
}
function phpunit {
( vendor/bin/phpunit $* )
@flyingluscas
flyingluscas / FullmetalAlchemistBrotherhood.md
Last active August 15, 2018 13:16
Fullmetal Alchemist: Brotherhood

Fullmetal Alchemist: Brotherhood - Episódio 4HD - MQFullmetal Alchemist: Brotherhood - Episódio 3HD - MQFullmetal Alchemist: Brotherhood - Episódio 1HD - MQFullmetal Alchem

@flyingluscas
flyingluscas / AttackOnTitanEpisodes.md
Last active August 15, 2018 13:16
Attack On Titan Episodes

Shingeki no Kyojin - Episódio 20
HD
MQ

Shingeki no Kyojin - Episódio 22
HD
MQ

Shingeki no Kyojin - Episódio 25
HD

@flyingluscas
flyingluscas / Searchable.md
Last active August 15, 2018 13:17
TNT Searchable Trait
<?php

use Illuminate\Database\Eloquent\Model;
use TeamTNT\TNTSearch\Facades\TNTSearch;

trait Searchable
{
    /**
     * Auto update search index using model events.
@flyingluscas
flyingluscas / MySublimeText3Settings.md
Last active August 15, 2018 13:17
My Sublime Text 3 Settings
@flyingluscas
flyingluscas / goTravisGo.js
Last active October 17, 2018 12:45
Go Travis Go
setInterval(() => document.querySelectorAll('.jobs-list li.failed .action-button--restart').forEach(button => button.click()), 60000)