"Medium traffic" = able to handle around 50 concurrent users on average.
If you want to handle 100+ concurrent users with the same modest hardware see the Varnish section below.
- 4096 MB memory
- 125GB SSD
- 4 CPUs
- Cpanel
| <?xml version="1.0"?> | |
| <ruleset name="MyStandard"> | |
| <description>PSR2 with tabs instead of spaces.</description> | |
| <arg name="tab-width" value="4"/> | |
| <rule ref="PSR2"> | |
| <exclude name="Generic.WhiteSpace.DisallowTabIndent"/> | |
| </rule> | |
| <rule ref="Generic.WhiteSpace.DisallowSpaceIndent"/> | |
| <rule ref="Generic.WhiteSpace.ScopeIndent"> | |
| <properties> |
| document.querySelector('[contenteditable]').addEventListener('paste', function (event) { | |
| event.preventDefault(); | |
| document.execCommand('inserttext', false, event.clipboardData.getData('text/plain')); | |
| }); |
| /** | |
| * VH and VW units can cause issues on iOS devices: http://caniuse.com/#feat=viewport-units | |
| * | |
| * To overcome this, create media queries that target the width, height, and orientation of iOS devices. | |
| * It isn't optimal, but there is really no other way to solve the problem. In this example, I am fixing | |
| * the height of element `.foo` —which is a full width and height cover image. | |
| * | |
| * iOS Resolution Quick Reference: http://www.iosres.com/ | |
| */ | |
| Para CPF | |
| /^\d{3}\.\d{3}\.\d{3}\-\d{2}$/ | |
| Para CNPJ | |
| /^\d{2}\.\d{3}\.\d{3}\/\d{4}\-\d{2}$/ | |
| Para ambos ao mesmo tempo |
"Medium traffic" = able to handle around 50 concurrent users on average.
If you want to handle 100+ concurrent users with the same modest hardware see the Varnish section below.
| // Brightness math based on: | |
| // http://www.nbdtech.com/Blog/archive/2008/04/27/Calculating-the-Perceived-Brightness-of-a-Color.aspx | |
| $red-magic-number: 241; | |
| $green-magic-number: 691; | |
| $blue-magic-number: 68; | |
| $brightness-divisor: $red-magic-number + $green-magic-number + $blue-magic-number; | |
| @function brightness($color) { | |
| // Extract color components |
| <?php | |
| public function core_template_route($uri_string) | |
| { | |
| ee()->your_lib_or_model->load_routes(); | |
| // Rest of your hook processing, if any. | |
| } | |
| public function load_routes() |
| ////////////////////////////////////////////////////////////// | |
| // Font Variables (http://cssfontstack.com/) | |
| ////////////////////////////////////////////////////////////// | |
| // | |
| // Serif font-stacks | |
| // | |
| $baskerville-font-stack: "Big Caslon", "Book Antiqua", "Palatino Linotype", Georgia, serif !default; |
| Array.prototype.compare = function(array) { | |
| if (!array) { | |
| return false; | |
| } | |
| if (this.length !== array.length) { | |
| return false; | |
| } | |
| for (var i = 0, l = this.length; i < l; i++) { | |
| if (this[i] instanceof Array && array[i] instanceof Array) { | |
| if (!this[i].compare(array[i])) { |