This file contains hidden or 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
A simple way to dual boot that doesn't involve messing around with boot managers and master boot records: | |
- Install Windows on SSD 1. | |
- Disconnect SSD 1. | |
- Install Linux on SSD 2. | |
- Reconnect SSD 1. | |
- Use BIOS boot device selector menu to switch (e.g. F8). |
This file contains hidden or 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 Illuminate\Contracts\Container\Container; | |
use Illuminate\Contracts\Container\ContextualAttribute; | |
use Illuminate\Support\Facades\Artisan; | |
#[Attribute(Attribute::TARGET_PARAMETER)] | |
class LazyGhost implements ContextualAttribute | |
{ | |
/** |
This file contains hidden or 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
Channel: https://www.youtube.com/feeds/videos.xml?channel_id=<channel-id> | |
Playlist: https://www.youtube.com/feeds/videos.xml?playlist_id=<playlist-id> | |
User: https://www.youtube.com/feeds/videos.xml?user=<user_id> | |
Link: https://news.ycombinator.com/item?id=32192352 |
This file contains hidden or 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\Providers; | |
use Illuminate\Support\Facades\Artisan; | |
use Illuminate\Support\Facades\DB; | |
use Illuminate\Testing\Concerns\TestDatabases; | |
use Illuminate\Testing\ParallelTestingServiceProvider as LaravelParallelTestingServiceProvider; | |
// Laravel doesn't support changing the database connection when running tests in parallel, so we have to override the relevant method. |
This file contains hidden or 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
#!/usr/bin/env bash | |
PROFILEDIR="$(mktemp -d)" | |
firefox --no-remote --profile "$PROFILEDIR" --screenshot $PWD/output.png https://xkcd.com | |
rm -r "$PROFILEDIR" |
This file contains hidden or 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
// @see: https://github.com/hassanshaikley/pico-pubsub | |
foo = () => ('foo', 'bar'); | |
console.log(foo()); // Returns 'bar' |
This file contains hidden or 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
@view-transition { | |
navigation: auto; | |
} | |
::view-transition-old(*), | |
::view-transition-new(*) { | |
animation: none; | |
mix-blend-mode: normal; | |
} |
This file contains hidden or 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 ArrayAccess; | |
use Countable; | |
use IteratorAggregate; | |
use Traversable; | |
class Items implements ArrayAccess, Countable, IteratorAggregate | |
{ | |
public function __construct(protected array $items = []) | |
{ |
This file contains hidden or 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 | |
> \Carbon\Carbon::now()->subMinutes(60)->longAbsoluteDiffForHumans(); | |
= "1 hour" | |
> \Carbon\Carbon::now()->subMinutes(1440)->longAbsoluteDiffForHumans(); | |
= "1 day" | |
> \Carbon\Carbon::now()->subMinutes(1560)->longAbsoluteDiffForHumans(); | |
= "1 day" |
This file contains hidden or 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 | |
// @see: https://www.php.net/releases/8.4/en.php | |
// @see: https://www.php.net/manual/en/language.oop5.lazy-objects.php | |
// @see: https://www.youtube.com/watch?v=7J6Z0F4vItw | |
// A simple Foo class with a constructor, property and method... | |
class Foo | |
{ | |
public string $foo; | |
NewerOlder