Skip to content

Instantly share code, notes, and snippets.

View mdmunir's full-sized avatar

Misbahul D Munir mdmunir

View GitHub Profile
@chabibnr
chabibnr / Yii_Library.php
Last active March 5, 2022 00:53
Library Yii2 for Codeigniter
<?php
define('YII_ENABLE_ERROR_HANDLER', false);
/**
* Class Yii_Library
* @package Libraries
*/
class Yii_Library
@cherifGsoul
cherifGsoul / Db.php
Last active July 27, 2016 22:43
Proof of concept and example how to implement facades for yii2 components
<?php
namespace app\components\facades;
/**
* Example how to use the facade class
* uses yii\db\Connection
*/
class Db extends Facade
{
@taufik-nurrohman
taufik-nurrohman / php-html-css-js-minifier.php
Last active February 23, 2024 04:30
PHP Function to Minify HTML, CSS and JavaScript
<?php
// Based on <https://github.com/mecha-cms/x.minify>
namespace x\minify\_ { // start namespace
$n = __NAMESPACE__;
\define($n . "\\token_boolean", '\b(?:true|false)\b');
\define($n . "\\token_number", '-?(?:(?:\d+)?\.)?\d+');