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
#!/usr/bin/env bash | |
: <<'DOC' | |
Directory structure: | |
MainFolder: | |
=> multicomnmit.sh | |
=> branch_name | |
=> repository_name | |
=> .git | |
---------------------------- | |
EXAMPLE: |
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
/** | |
* Restore Console | |
* @author Marco Cesarato <cesarato.developer@gmail.com> | |
*/ | |
function restoreConsole() { | |
// Create an iframe for start a new console session | |
var iframe = document.createElement('iframe'); | |
// Hide iframe | |
iframe.style.display = 'none'; | |
// Inject iframe on body document |
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 | |
/** | |
* Check if site run over https | |
* | |
* @author Marco Cesarato <cesarato.developer@gmail.com> | |
* @return boolean | |
*/ | |
if (!function_exists('is_https')){ | |
function is_https(){ | |
if (isset($_SERVER['HTTP_HOST'])){ |
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 php var_export | |
* @author Marco Cesarato <cesarato.developer@gmail.com> | |
* @param str | |
* @returns {*} | |
*/ | |
function php2js(str) { | |
str = str.trim(); | |
str = str.replace('<?php', ''); | |
str = str.replace('?>', ''); |
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 | |
/** | |
* Build URL query params | |
* as http_build_query build a query url the difference is | |
* that this function is array recursive and compatible with PHP4 | |
* | |
* @author Marco Cesarato <cesarato.developer@gmail.com> | |
* @param $query | |
* @param string $parent | |
* @return 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 | |
/** | |
* Generate user friendly password | |
* @author Marco Cesarato <cesarato.developer@gmail.com> | |
* @copyright Copyright (c) 2014-2018 | |
* @license http://opensource.org/licenses/gpl-3.0.html GNU Public License | |
* @link https://github.com/marcocesarato/PHP-AIO-Security-Class | |
* | |
* @param $string | |
* @param bool $strong_lv (0-2) |
NewerOlder