Skip to content

Instantly share code, notes, and snippets.

@egesu
egesu / BooleanMiddleware.php
Created September 19, 2022 11:16 — forked from yedincisenol/BooleanMiddleware.php
Laravel 5.8+ boolean string to boolean middleware
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
class BooleanMiddleware
{
/**
@egesu
egesu / mdxUtil.js
Last active November 4, 2016 12:38 — forked from Todd-Werelius/mdxUtil.js
Angular Material Directive to Access Theme Colors
// source: https://gist.github.com/Todd-Werelius/bbc735daec6951938c4b
(function() {
angular.module('mdxUtil', ['ngMaterial'])
.directive('mdxPaintFg', function(mdx) {
"use strict";
return {
restrict: 'A',
link: function(scope, element, attributes) {
setRGB(element, 'color', mdx.mdxThemeColors, attributes.mdxPaintFg, 'mdx-paint-fg');