Skip to content

Instantly share code, notes, and snippets.

View kevyworks's full-sized avatar

Kevyworks kevyworks

View GitHub Profile
@iamsajidjaved
iamsajidjaved / AppServiceProvider.php
Created December 12, 2019 07:04 — forked from simonhamp/AppServiceProvider.php
A pageable Collection implementation for Laravel
<?php
namespace App\Providers;
use Illuminate\Support\Collection;
use Illuminate\Pagination\LengthAwarePaginator;
class AppServiceProvider extends ServiceProvider
{
public function boot()
@icebob
icebob / README.md
Created January 10, 2019 20:14
Inter-namespace middleware

Inter-namespace middleware

This middleware can connect to other namespaces.

Usage

Connect to other namespaces with the same broker options

moleculer.config.js

const InterNamespaceMiddleware = require("./inter-namespace.js");
@faneder
faneder / SNSController.php
Created September 11, 2018 03:21
handle notification from AWS SNS
<?php
use Notification;
use Aws\Sns\Message;
use Aws\Sns\MessageValidator;
use Aws\Sns\Exception\InvalidSnsMessageException;
class SNSController extends Controller
{
@faneder
faneder / routes.php
Created September 11, 2018 02:29
handle bounces route from SNS
<?php
Route::group([
'namespace' => 'Eder\Controllers\Aws',
'prefix' => 'aws',
],
function () {
Route::post('/sns/handle-bounces', 'SNSController@handleNotification');
}
);
@faneder
faneder / SendNotificationEmail.php
Last active June 23, 2020 20:31
Email notification in laravel
<?php
namespace Eder\Jobs;
use Eder\Jobs\Job;
use Illuminate\Contracts\Mail\Mailer;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Bus\SelfHandling;
use Illuminate\Contracts\Queue\ShouldQueue;
@icebob
icebob / stat.service.js
Created June 15, 2018 09:35
Old $node.stats code as a service
"use strict";
const defaultsDeep = require("lodash/defaultsDeep");
/**
*
*
* @class StatRequestStore
*/
class StatRequestStore {
@fducloux
fducloux / Screen Shot 2018-02-27 at 11.44.36 PM.png
Created February 27, 2018 15:33 — forked from kleo/backspace.md
PLDT HOME FIBR AN5506-04-FA RP2616 Advanced Settings
Screen Shot 2018-02-27 at 11.44.36 PM.png
@davidpiesse
davidpiesse / Schedulable.php
Last active September 7, 2023 15:22
Laravel Custom Class/Model Scheduling
<?php
//Don't forget to change the namespace!
namespace App\Traits;
use Cron\CronExpression;
use Illuminate\Support\Carbon;
use Illuminate\Console\Scheduling\ManagesFrequencies;
trait Schedulable{
@CodeMyUI
CodeMyUI / index.html
Created November 15, 2017 06:46
Unnamed Menu - CSS
<div class="base">
<div class="menu">
<div class="icon">
<div class="bar"></div>
</div>
</div>
<div class="icons">
<i class="fa fa-user" aria-hidden="true"></i>
<i class="fa fa-calendar-o" aria-hidden="true"></i>
<i class="fa fa-tachometer" aria-hidden="true"></i>
@kleo
kleo / backspace.md
Last active July 28, 2023 17:59
backspace

Project moved due to excessive amount of unicorns. Repo https://git.io/adminpldt

Our community of amazing people. Managed by a cat. Backspace https://discord.gg/C43625u

Gist here will not be updated anymore Discussion here on Gist is still allowed but I strongly recommend going over to the repository or Discord chat