| /*----------------------------------------------------------------------------*/ | |
| // redirects for login / logout | |
| /*----------------------------------------------------------------------------*/ | |
| add_filter('woocommerce_login_redirect', 'login_redirect'); | |
| function login_redirect($redirect_to) { | |
| return home_url(); | |
| } |
| .wp-video, video.wp-video-shortcode, .mejs-container, .mejs-overlay.load { | |
| width: 100% !important; | |
| height: 100% !important; | |
| } | |
| .mejs-container { | |
| padding-top: 56.25%; | |
| } | |
| .wp-video, video.wp-video-shortcode { | |
| max-width: 100% !important; | |
| } |
| /** Faster rounding function to avoid heavy use of Math.round */ | |
| function round(n) { | |
| return (n + 0.5) << 0; | |
| } | |
| /** | |
| * Wrapper for getBoundingClientRect that returns a | |
| * subset ('top','left') and includes a 'width' and 'height'. | |
| * It also rounds the pixel measurements to the nearest integer value | |
| * |
Moved to git repository: https://github.com/denji/nginx-tuning
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.
I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.
To allow easier contributions, I've moved this to https://github.com/cheeaun/javascript-error-logging. Thanks! 😄
- http://errorception.com/ - translate error messages to English
- http://www.exceptionhub.com/
- http://jserrlog.appspot.com/
- http://www.muscula.com/ - source maps, translate error messages to English
- https://www.airbrake.io/ - tracekit, source maps
| function declOfNum(number, titles) { | |
| cases = [2, 0, 1, 1, 1, 2]; | |
| return titles[ (number%100>4 && number%100<20)? 2 : cases[(number%10<5)?number%10:5] ]; | |
| } | |
| use: | |
| declOfNum(count, ['найдена', 'найдено', 'найдены']); |

