Simplified model based on Varnish approach.
For every request, the proxy first calculates a primary hash:
primary_key = hash(host, url)
| # API Design Guidelines | |
| # Introduction | |
| The PayPal platform is a collection of reusable services that encapsulate well-defined business capabilities. Developers are encouraged to access these capabilities through Application Programming Interfaces (APIs) that enable consistent design patterns and principles. This facilitates a great developer experience and the ability to quickly compose complex business processes by combining multiple, complementary capabilities as building blocks. | |
| PayPal APIs follow the [RESTful][0] architectural style as much as possible. To support our objectives, we have developed a set of rules, standards, and conventions that apply to the design of RESTful APIs. These have been used to help design and maintain hundreds of APIs and have evolved over several years to meet the needs of a wide variety of use cases. | |
| We are sharing these guidelines to help propagate good API design practices in general. We have pulled extensively from the broader community and believe that it is importan |
| #!/bin/bash | |
| # Based on https://discuss.elastic.co/t/finding-and-deleting-empty-indexes/172764 | |
| # Usage: | |
| # elastic_search_delete_empty_indexes.sh servername:9200 #for dry run | |
| # elastic_search_delete_empty_indexes.sh servername:9200 delete #to really delete | |
| srv="" | |
| delete=false |
| <?php | |
| /** | |
| * Last byte for IPv4 and last 80 bits for IPv6 are set to zero | |
| * @see https://support.google.com/analytics/answer/2763052?hl=en | |
| */ | |
| function anonymizeIp($ip) | |
| { | |
| $binary = inet_pton($ip); | |
| if ($binary === false) { | |
| return false; |
| var detectUrls = function(text) { | |
| var pattern = /(?:^|[\s\n\r])((?:https?:\/\/|www\.)[^\s\n\r]+)/ig, | |
| urls = [], | |
| matches; | |
| while ((matches = pattern.exec(text)) !== null) { | |
| urls.push(matches[1]); | |
| } | |
| return urls; | |
| }; |
| var getElementsByXPath = function(xpath, parentElement) { | |
| var xpathResult = document.evaluate(xpath, parentElement, null, XPathResult.ANY_TYPE, null); | |
| var results = []; | |
| var element = xpathResult.iterateNext(); | |
| while(element) { | |
| results.push(element); | |
| element = xpathResult.iterateNext(); | |
| } | |
| return results; | |
| } |
| local _M = {} | |
| function _M.getHostname() | |
| local f = io.popen ("/bin/hostname") | |
| local hostname = f:read("*a") or "" | |
| f:close() | |
| hostname =string.gsub(hostname, "\n$", "") | |
| return hostname | |
| end | |
| return _M |