Skip to content

Instantly share code, notes, and snippets.

View loekwetzels's full-sized avatar
🚀

Loek Wetzels loekwetzels

🚀
  • secretninjas.nl / eightbits.nl / develop-s.nl
  • Maastricht, Netherlands
  • 21:03 (UTC +01:00)
View GitHub Profile
@azizur
azizur / Creating a static copy of a dynamic website.md
Last active March 26, 2024 18:32
Creating a static copy of a dynamic website

The command line, in short…

wget -k -K -E -r -l 10 -p -N -F --restrict-file-names=windows -nH http://website.com/

…and the options explained

  • -k : convert links to relative
  • -K : keep an original versions of files without the conversions made by wget
  • -E : rename html files to .html (if they don’t already have an htm(l) extension)
  • -r : recursive… of course we want to make a recursive copy
  • -l 10 : the maximum level of recursion. if you have a really big website you may need to put a higher number, but 10 levels should be enough.
@djaiss
djaiss / laravel-test-job-dispatches-other-jobs.php
Created August 15, 2020 14:06
How to test that a job dispatches another job in Laravel
<?php
namespace Tests\Unit\Jobs;
use Tests\TestCase;
use Illuminate\Support\Facades\Queue;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class FirstJobTest extends TestCase
{