Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
| # Install phpbrew | |
| sudo apt-get update | |
| sudo apt-get install libmcrypt-dev | |
| curl -L -O https://github.com/phpbrew/phpbrew/raw/master/phpbrew | |
| chmod +x phpbrew | |
| sudo mv phpbrew /usr/local/bin/ | |
| phpbrew init | |
| [[ -e ~/.phpbrew/bashrc ]] && source ~/.phpbrew/bashrc |
| #!/bin/sh | |
| # Based on instructions found here: http://wiki.razuna.com/display/ecp/FFMpeg+Installation+on+CentOS+and+RedHat#FFMpegInstallationonCentOSandRedHat-InstallX264 | |
| if [ "`/usr/bin/whoami`" != "root" ]; then | |
| echo "You need to execute this script as root." | |
| exit 1 | |
| fi | |
| cat > /etc/yum.repos.d/centos.repo<<EOF |
| <?php | |
| /* config/site_post.php */ | |
| $req = Request::get(); | |
| if ($req->getRequestPath() == 'export_scrapbook_proxies') { | |
| $root = new SimpleXMLElement("<concrete5-cif></concrete5-cif>"); | |
| $root->addAttribute('version', '1.0'); | |
| $pages = $root->addChild("pages"); | |
| // Get all active scrapbook proxy blocks |
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
| #!/bin/bash | |
| # Creator: Phil Cook | |
| # Modified: Andy Miller | |
| brew_prefix=$(brew --prefix | sed 's#/#\\\/#g') | |
| brew_array=("5.5","5.6","7.0","7.1","7.2", "7.3") | |
| php_array=("[email protected]" "[email protected]" "[email protected]" "[email protected]" "[email protected]" "[email protected]") | |
| valet_support_php_version_array=("[email protected]" "[email protected]" "[email protected]" "[email protected]" "[email protected]" "[email protected]") | |
| php_installed_array=() | |
| php_version="php@$1" |
| <?php | |
| // /application/bootstrap/app.php | |
| Route::register('/ccm/request_test', function() { | |
| header("Pragma: no-cache"); | |
| echo '<dl>'; | |
| ?><dt>Application environment:</dt><dd><?php echo ($this->app->environment()) ? $this->app->environment() : 'default'; ?></dd><?php | |
| $request = \Concrete\Core\Http\Request::getInstance(); | |
| ?><dt>Client IP:</dt><dd><?php echo $request->getClientIp(); ?></dd><?php | |
| ?><dt>Host:</dt><dd><?php echo $request->getHost(); ?></dd><?php | |
| ?><dt>Port:</dt><dd><?php echo $request->getPort(); ?></dd><?php |
| <?php | |
| // from http://php.net/manual/en/function.filesize.php | |
| function formatBytes($bytes, $precision = 2) { | |
| $units = array('B', 'KB', 'MB', 'GB', 'TB'); | |
| $bytes = max($bytes, 0); | |
| $pow = floor(($bytes ? log($bytes) : 0) / log(1024)); | |
| $pow = min($pow, count($units) - 1); | |
| #!/bin/bash | |
| # Explains how to use the script | |
| usage() | |
| { | |
| cat << EOF | |
| usage: $0 options | |
| $0 -o output_file.zip commit_from [commit_to] |