Skip to content

Instantly share code, notes, and snippets.

View OSDDQD's full-sized avatar

Oscar OSDDQD

  • SAB Games
  • UZ, Tashkent
View GitHub Profile
@OSDDQD
OSDDQD / ThrottleMiddleware.php
Created January 19, 2023 00:50
Prevent Concurrent Requests
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Exceptions\HttpResponseException;
use Illuminate\Support\Facades\Cache;
use RuntimeException;
use Symfony\Component\HttpFoundation\Response;
#define FASTLED_ALLOW_INTERRUPTS 0
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
// #include <ESP8266httpUpdate.h>
#include "FastLED.h"
#include "FlexTimer.h"
#include "FastFX.h"
// #include "FFXCoreEffects.h"
#define PIR_PIN 14
#define FASTLED_ALLOW_INTERRUPTS 0
#include "ESP8266WiFi.h"
#include "WiFiUdp.h"
#include "ESP8266httpUpdate.h"
#include "FastLED.h"
#include "FlexTimer.h"
#include "FastFX.h"
#include "FFXCoreEffects.h"
@OSDDQD
OSDDQD / SendInvoice.php
Created November 23, 2017 16:06
Sending queued email
<?php
namespace App\Jobs;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use App\Models\Invoice;