This file contains hidden or 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
[General] | |
disabledTrayIcon=false | |
filenamePattern=%j%A%M%S%H_screenshot |
This file contains hidden or 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 | |
function UUID(){ | |
return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x', | |
mt_rand(0, 0xffff), mt_rand(0, 0xffff), | |
mt_rand(0, 0xffff), | |
mt_rand(0, 0x0fff) | 0x4000, | |
mt_rand(0, 0x3fff) | 0x8000, | |
mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff) | |
); | |
} |
This file contains hidden or 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
import Swal from "sweetalert2"; | |
export default { | |
success: function(options, callback) { | |
if ("string" == typeof options) { | |
options = { title: options }; | |
} | |
var settings = Object.assign( | |
{}, |
This file contains hidden or 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
/** | |
* Adds CORS ( Cross-origin resource sharing ) headers to the response | |
* | |
* @param {object} request the Request object | |
* @param {object} response the Response object | |
* @param {function} next function to continue execution | |
* | |
* @return {void} | |
*/ | |
module.exports = ( request, response, next ) => { |
This file contains hidden or 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
<div class="components__Loader"></div> |
This file contains hidden or 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 | |
if( ! defined( 'FILTER_VALIDATE_BOOLEAN' ) ){ | |
define( 'FILTER_VALIDATE_BOOLEAN', 258 ); | |
} | |
$db_value = 1; | |
$bool_value = filter_var( $db_value, FILTER_VALIDATE_BOOLEAN ); | |
var_dump( $bool_value ); |
This file contains hidden or 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 | |
/** | |
* Array sort by column | |
* | |
* @author Lenivene | |
* @param array List | |
* @param string|array Columns name or single column | |
* @param int Order BY ASC|DESC. | |
* I recommend you use constant, Ex: SORT_ASC = 4 ( int ) | SORT_DESC = 3 ( int ) | |
*/ |
This file contains hidden or 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 | |
/** | |
* Create a array tree from array list | |
* | |
* @param array ( Required ) The list to create tree | |
* @param string The name key parent. Ex: parent_id | |
* @param string The key to check child. Ex: ID | |
* | |
* @return array|false Returns array if the date given is not empty; otherwise returns FALSE. | |
*/ |
This file contains hidden or 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
module.exports = (object, ...keys) => { | |
const newObject = {}; | |
keys.forEach(key => newObject[key] = object[key]) | |
return newObject; | |
} |
This file contains hidden or 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 | |
function count_months_in_time( $timestamp ){ | |
$time_now = time(); | |
$months = ( ( ( date( 'Y', $timestamp ) - date( 'Y', $time_now ) ) * 12 ) + ( date( 'm', $timestamp ) - date( 'm', $time_now ) ) ); | |
return $months; | |
} | |
echo count_months_in_time( strtotime( date( '09/08/2019' ) ) ); |