Skip to content

Instantly share code, notes, and snippets.

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

Mayank Dudakiya mayanksdudakiya

🏠
Working from home
View GitHub Profile
@piyushgarg-dev
piyushgarg-dev / README.md
Last active July 15, 2025 08:08
Kafka Crash Course
@MattApril
MattApril / ConsoleSchedulingTest.php
Last active July 4, 2024 09:25
A simple way of testing that your Lumen commands are scheduled exactly when and how you expect. This approach does not trigger commands to actually execute, which is what a lot of other suggestions do.
<?php
use App\Console\Kernel;
use Carbon\Carbon;
use Illuminate\Console\Scheduling\Event;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Support\Collection;
class ConsoleSchedulingTest extends TestCase
{
@OliverMensahDev
OliverMensahDev / Journey_into_all_bles_of_code.md
Last active August 18, 2024 11:09
Journey into writing code that is readable, understandable ,maintainable and testable as well as how to prepare codebase to embrace future changes.

Journey into writing code that is readable, understandable ,maintainable and testable as well as how to prepare codebase to embrace future changes.

I wonder from time to time whether I'm doing the right thing with respect to guidelines and principles when using an object-oriented programming approach to create application. I started reading Object Design Style Guide book last year to learn more about objects. And beginning this year, I decided to delve deeper into writing code that is readable, understandable and maintainable as well as how to prepare codebase to embrace future changes.

Here are the resources used:

Book

  • Object Design Style Guide:
  • Principles of Package Design

Pluralsight Courses

  • Writing Readable and Maintainable Code
@jeffochoa
jeffochoa / Response.php
Last active June 7, 2025 08:04
Laravel HTTP status code
<?php
// This can be found in the Symfony\Component\HttpFoundation\Response class
const HTTP_CONTINUE = 100;
const HTTP_SWITCHING_PROTOCOLS = 101;
const HTTP_PROCESSING = 102; // RFC2518
const HTTP_OK = 200;
const HTTP_CREATED = 201;
const HTTP_ACCEPTED = 202;