Skip to content

Instantly share code, notes, and snippets.

@ericvanjohnson
ericvanjohnson / ThrottleRequest.php
Last active July 18, 2016 07:37
My back port to Laravel 5.1 of the Laravel 5.2 middleware feature to have the ability to throttle request coming in.
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Response;
use Illuminate\Cache\RateLimiter;
class ThrottleRequests
{
@RPDiep
RPDiep / README.md
Last active March 4, 2016 15:07
Ubuntu Kernel Cleanup

Ubuntu Kernel Cleanup

General

This script is used to remove old kernels cluttering /boot on Ubuntu systems. The following kernels are preserved:

  • The running kernel
  • The latest kernel from each major version