This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Aufa\Gist\Component; | |
/** | |
* Class DataStorage | |
* @package Aufa\Gist\Component | |
* | |
* add backslash to use default core function - to avoid user create new functions instead of | |
*/ | |
class DataStorage implements \ArrayAccess, \Serializable, \Countable, \JsonSerializable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Example | |
*/ | |
namespace MyNameSpace; | |
use Slim\App as Slim; | |
use Pentagonal\Component\Slim\BenchMark; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$database = \MyNameSpace\ExamDB::create( | |
'mysql', | |
[ | |
'dbuser' => 'root', | |
'dbpass' => 'password', | |
'dbname' => 'test', | |
'host' => 'localhost' | |
], | |
true // debug true throwed if error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* $db = ExamDB::create('driver', [ | |
* 'dbuser' => 'user', ------. For Sqlite allowed empty | |
* 'dbpass' => 'pass', ------. | |
* 'port' => 3306, ------ // allowed empty to use default port | |
* 'dbname' => 'database_name', | |
* 'attributes' => [ | |
* PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC // PDO Attribute | |
* ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Deny First | |
Deny from all | |
# Does not allow access executable files | |
# Allow only if not an executable / static resource | |
# that allow to be access | |
# note : | |
# ?i: = hat means incase sensitive | |
# (?!( = start except of current regex | |
# Below setting is affected to : |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Hackie of CI 3 Core URL Fix Sanitized | |
* Automation detect base url | |
* @pentagonal | |
*/ | |
if (!class_exists('CI_Config')) { | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am aufa on github. | |
* I am nawa (https://keybase.io/nawa) on keybase. | |
* I have a public key whose fingerprint is 8697 D389 2DFC 5690 E501 B237 F005 9FF1 26BF 7E64 | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Minify CSS | |
* @param string css text | |
* @return sting minified css text | |
* @author awan <[email protected]> | |
*/ | |
function minifyCSS(text) | |
{ | |
// check if css is string values | |
if (typeof text != 'string') { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* HTML Output Filter | |
* @author awan <[email protected]> | |
*/ | |
/** | |
* Entities the Multibytes string | |
* | |
* @param string $string the string to detect multibytes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! Util JS | |
* Small File javascript function | |
* collection Without jQuery as User Authentication Helper | |
* @author awan <nawa (at) yahoo (dot) com> | |
* | |
-------------------------------- */ | |
/** | |
* global zxcvbn | |
* Get scores of password meter |
NewerOlder