git checkout -b <branchname>
git add
git commit -m "description of changes"
| # To enable rate limiting simply add the following line to the top-level of your config file: | |
| # 1 request / second | |
| limit_req_zone $binary_remote_addr zone=login:10m rate=1r/s; | |
| # Then apply it to a location by adding a rate limiting burst to your server block: | |
| location /account/login/ { | |
| # apply rate limiting | |
| limit_req zone=login burst=5; |
| server { | |
| # ... | |
| # files starting with .dot | |
| # | |
| location ~ /\. { | |
| deny all; |
| #! /bin/bash | |
| SEARCHED=$1 | |
| if [ -z $SEARCHED ]; then | |
| SEARCHED=/api/flights/fares | |
| fi | |
| echo "Protecting $SEARCHED" | |
| echo "Reading:" |
| user nginx; | |
| # one(1) worker or equal the number of _real_ cpu cores. 4=4 core cpu | |
| worker_processes 4; | |
| # renice workers to reduce priority compared to system processes for | |
| # machine health. worst case nginx will get ~25% system resources at nice=15 | |
| worker_priority -5; |
| // http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
| // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
| // requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
| // MIT license | |
| (function() { | |
| var lastTime = 0; | |
| var vendors = ['ms', 'moz', 'webkit', 'o']; |
The reflow appens as many times as there are frames per seconds. It recalculate all positions that change in order to diplay them. Basically, when you scroll you execute a function where you move things between two reflows. But there are functions that triggers reflows such as jQuery offset, scroll... So there are two things to take care about when you dynamically change objects in javascript to avoid too many reflows:
| #!/bin/bash | |
| # remember the directory we are starting from | |
| # the script expects the MongoDB configuration files here | |
| export homeDirectory=$PWD | |
| # directory where MongoDB/TokuMX tarballs are located | |
| export tarDirectory=/home/tcallaghan/big-dir/backups/mongodb | |
| # directory used for MongoDB server binaries and data folder |
| import React from 'react'; | |
| /** | |
| * Method container for React. Very helpful to avoid boilerplate code. | |
| * | |
| * export default methodContainer((props) => { method, param }, Component) | |
| * Will send {error, data, ready} as props to the specified Component | |
| * | |
| * On behalf of www.drivindu.com | |
| * |
| //Look for other responsivevoice instances | |
| /*if (window.parent != null) { | |
| var iframes = window.parent.document.getElementsByTagName('iframe'); | |
| for (var i = 0; i < iframes.length; i++) { | |
| //iframes[i].style.width = "300px" | |
| } | |
| }*/ | |
| if (typeof responsiveVoice != 'undefined') { | |
| console.log('ResponsiveVoice already loaded'); |