| Gigabytes (GB) | Megabytes (MB) decimal | Megabytes (MB) binary |
|---|---|---|
| 1 GB | 1,000 MB | 1,024 MB |
| 2 GB | 2,000 MB | 2,048 MB |
| 3 GB | 3,000 MB | 3,072 MB |
| 4 GB | 4,000 MB | 4,096 MB |
| 5 GB | 5,000 MB | 5,120 MB |
| 6 GB | 6,000 MB | 6,144 MB |
| 7 GB | 7,000 MB | 7,168 MB |
| 8 GB | 8,000 MB | 8,192 MB |
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 | |
| $selectField = $modx->getOption('emailSelectField', $scriptProperties, 'department'); | |
| $selectTo = $modx->getOption('emailSelectTo', $scriptProperties, ''); | |
| $selectTo = ($selectTo) ? explode(',', $selectTo) : array(); | |
| if ($selectField && $selectTo) { | |
| $selected = intval($hook->getValue($selectField)) - 1; | |
| if ($selected && isset($selectTo[$selected])) { | |
| $hook->formit->config['emailTo'] = $selectTo[$selected]; | |
| } |
In your local clone of your forked repository, you can add the original GitHub repository as a "remote". ("Remotes" are like nicknames for the URLs of repositories - origin is one, for example.) Then you can fetch all the branches from that upstream repository, and rebase your work to continue working on the upstream version. In terms of commands that might look like:
git remote add upstream https://github.com/whoever/whatever.git
git fetch upstream
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 | |
| // set context | |
| $_REQUEST['ctx'] = 'web'; | |
| require_once dirname(dirname(dirname(dirname(__FILE__)))).'/config.core.php'; | |
| require_once MODX_CORE_PATH.'config/'.MODX_CONFIG_KEY.'.inc.php'; | |
| require_once MODX_CONNECTORS_PATH . 'index.php'; | |
| // define allowed actions | |
| $webActions = array( | |
| 'one/allowed/action', |
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
| /* | |
| * This function copy $source directory and all files | |
| * and sub directories to $destination folder | |
| */ | |
| function recursive_copy($src,$dst) { | |
| $dir = opendir($src); | |
| @mkdir($dst); | |
| while(( $file = readdir($dir)) ) { | |
| if (( $file != '.' ) && ( $file != '..' )) { |
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 | |
| /** | |
| * Ajax Connector | |
| * | |
| * @package mypackage | |
| */ | |
| $validActions = array( | |
| 'web/data/delete', | |
| 'web/data/edit' |
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 | |
| /* | |
| * A small MODX plugin to avoid refreshing - by default - the entire site cache when editing a cached resource - (c) 2012 ackwa.fr | |
| * | |
| * @version : 1.0.0 | |
| * @see : https://gist.github.com/gists/3639503 | |
| * @name : syncpage.php | |
| * @author : g.noel@ackwa.fr | |
| * | |
| * @event : OnDocFormSave, OnDocFormPrerender |