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
| # Varnish 4.0 configuration for Craft | |
| # | |
| # Based on the following: | |
| # - https://github.com/mattiasgeniar/varnish-4.0-configuration-templates/blob/master/default.vcl | |
| # - https://gist.github.com/aelvan/eba03969f91c1bd51c40 | |
| vcl 4.0; | |
| import std; | |
| import directors; |
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
| <select name="timezone" > | |
| <option disabled selected style='display:none;'>Time Zone...</option> | |
| <optgroup label="US (Common)"> | |
| <option value="America/Puerto_Rico">Puerto Rico (Atlantic)</option> | |
| <option value="America/New_York">New York (Eastern)</option> | |
| <option value="America/Chicago">Chicago (Central)</option> | |
| <option value="America/Denver">Denver (Mountain)</option> | |
| <option value="America/Phoenix">Phoenix (MST)</option> | |
| <option value="America/Los_Angeles">Los Angeles (Pacific)</option> |
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 | |
| public function startup(){ | |
| App::import('Datasource', 'Mongodb.Mongodb'); | |
| $this->mongo = ConnectionManager::getDataSource($this->SearchLog->useDbConfig); | |
| } | |
| public function main(){ | |
| $map = 'function () { emit(this.slug, {count:1}); }'; | |
| $reduce = 'function (key, values) { var count = 0; values.forEach(function (v) {count += v.count;}); return count; }'; |