How to Make a Shallow Copy of a Git Repository Without History
Sometimes you want to start a new project using the current state of an existing repository, but you don’t want to bring along all the commit history. This is called…
Sometimes you want to start a new project using the current state of an existing repository, but you don’t want to bring along all the commit history. This is called…
Sometimes you need to create a copy of an existing Git repository—maybe to start a new project, share a codebase with a different team, or set up a public starter…
If the services used in a docker-compose.yml file have got updates and you want to update these on your deployed docker containers, then run the following commands. Steps: 1] Go…
These are some notes and commands I frequently use for SSH. If you need to generate SSH keys use the following command and follow the prompts: ssh-keygen -t ed25519 -C…
Sometimes in Livewire v3, certain input fields (e.g. select) do not update when the model is changed. To resolve this you can add a wire:key to the input with specific…
Sometimes a test fails certain times but passes another. If you want to run a test multiple times you can use the following one line bash script: for i in…
Sometimes you want to use the HTML output from a blade component in a PHP class. You can do this using the view('component')->render() method. For example: Let's say we had…
If you want to execute code from a trait when using php artisan tinker, you can do so in one of two methods. 1] Instantiate the class using the trait…
In Laravel, you can create a model with all the "batteries included" using the command: php artisan make:model Author -cfmsr Where the following makes a Controller, Factory, Migration, Seeder, Resource…
In PostgreSQL you can check if an index is being used for a query by using the EXPLAIN (ANALYZE , BUFFERS) before the query like: EXPLAIN (ANALYZE, BUFFERS) SELECT *…