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
// | |
// DeviceModelManager.swift | |
// A utility struct for managing device model mappings based on hardware machine identifiers. | |
// | |
// @author Mohamed Riyad <m@ryad.dev> | |
// @link https://RyadPasha.com | |
// @license MIT | |
// | |
import Foundation |
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
/** | |
* MultiSourceTranslator is a class that provides translation capabilities with support for multiple sources, such as | |
* file-based translations and database translations. It allows you to load translations for multiple languages and | |
* supports string interpolation using placeholders. | |
* | |
* @class MultiSourceTranslator | |
* @author Mohamed Riyad <m@ryad.dev> | |
* @link https://RyadPasha.com | |
* @copyright Copyright (C) 2023 RyadPasha. All rights reserved. | |
* @license MIT |
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
import util from 'util' // In TS | |
// Or | |
import { inspect } from 'util' // Directly (TS) | |
// Or | |
const util = require('util') // In JS | |
// Or | |
const { inspect } = require('util') // Directly (JS) | |
// Then: | |
console.log(util.inspect(request)) // Or `console.log(inspect(request))` in case you directly imported it |
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
/** | |
* TimeUtility is a utility class that provides a set of methods to handle time-related operations. | |
* | |
* @class DatabaseManager | |
* @author Mohamed Riyad <m@ryad.me> | |
* @link https://RyadPasha.com | |
* @copyright Copyright (C) 2023 RyadPasha. All rights reserved. | |
* @license MIT | |
* @version 1.0.0-2023.07.26 | |
* @see {@link https://momentjs.com/} for more information on Moment.js |
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
/** | |
* Logger class that wraps 'winston' and provides custom | |
* logging capabilities with different log levels. | |
* | |
* @class Logger | |
* @author Mohamed Riyad <m@ryad.dev> | |
* @link https://RyadPasha.com | |
* @copyright Copyright (C) 2024 RyadPasha. All rights reserved. | |
* @license MIT | |
* @version 1.0.2-2024.01.03 |
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
/** | |
* DatabaseManager class that handles multiple database connections using Knex.js. | |
* | |
* @class DatabaseManager | |
* @author Mohamed Riyad <m@ryad.me> | |
* @link https://RyadPasha.com | |
* @copyright Copyright (C) 2023 RyadPasha. All rights reserved. | |
* @license MIT | |
* @version 1.0.0-2023.07.16 | |
* @see {@link https://knexjs.org} for more information on Knex.js |
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
/** | |
* PushTokensValidator: A Node.js class for validating | |
* the authenticity of FCM and APN device/push tokens. | |
* | |
* @class PushTokensValidator | |
* @author Mohamed Riyad <m@ryad.dev> | |
* @link https://RyadPasha.com | |
* @link https://gist.github.com/RyadPasha/297ae21e94fe57eb210e7eba6cf1cc42 | |
* @copyright Copyright (C) 2023 RyadPasha. All rights reserved. | |
* @license MIT |
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
/** | |
* A service class representing the HuaweiAPI to send push | |
* notifications and check the risk of a device on Huawei devices. | |
* | |
* @class HuaweiAPI | |
* @author Mohamed Riyad <m@ryad.me> | |
* @link https://RyadPasha.com | |
* @link https://gist.github.com/RyadPasha/8aa30994e08b9ed08183b091f596d7eb | |
* @copyright Copyright (C) 2023 RyadPasha. All rights reserved. | |
* @license MIT |
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
/** | |
* Parse command-line arguments in the format: | |
* ● --arg_name=arg_value | |
* ● -arg_name=arg_value | |
* ● arg_name=arg_value | |
* | |
* @author Mohamed Riyad <m@ryad.me> | |
* | |
* @param {string[]} [args] - The array of command-line arguments. | |
* @returns {Object} An object containing the parsed arguments. |
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
/** | |
* Real User IP Grabber | |
* | |
* @author Mohamed Riyad <m@ryad.me> | |
* @link RyadPasha.com | |
* @copyright Copyright (C) 2022 RyadPasha. All rights reserved. | |
* @license GNU General Public License v3.0 http://www.gnu.org/copyleft/gpl.html | |
* @version Release: 1.0 | |
* @since 10 Nov, 2022 | |
*/ |
NewerOlder