Put the following directives in your server
block. nginx will then redirect URLs with double (or triple or multiple) slashes to the corresponding URL with a single slash.
merge_slashes off;
rewrite ^(.*?)//+(.*?)$ $1/$2 permanent;
const http = require('http'), | |
fs = require('fs'); | |
http.createServer(function(request, response) { | |
const filePath = 'test.wav'; | |
const stat = fs.statSync(filePath); | |
const fileSize = stat.size; | |
const range = request.headers.range; | |
if (range) { |
(function() { | |
Element.prototype.eventListenerList = {}; | |
Element.prototype._addEventListener = Element.prototype.addEventListener; | |
Element.prototype.addEventListener = function(type, listener) { | |
this._addEventListener(type, listener); | |
if (!this.eventListenerList[this.id]) { | |
this.eventListenerList[this.id] = {}; | |
} |
function f() { | |
const nodes = document | |
.getElementById('/embed/colors-game') | |
.contentWindow.document.getElementsByClassName('_3K3dipl65wOMpaMU-KVKf0'); | |
const nodesByColor = {}; | |
for (let i = 0; i < nodes.length; i++) { | |
const outerHTML = nodes[i].outerHTML; | |
const color = outerHTML.split('background-color: ')[1].split(';')[0]; | |
if (typeof nodesByColor[color] === 'undefined') { | |
nodesByColor[color] = []; |
Put the following directives in your server
block. nginx will then redirect URLs with double (or triple or multiple) slashes to the corresponding URL with a single slash.
merge_slashes off;
rewrite ^(.*?)//+(.*?)$ $1/$2 permanent;
(() => { | |
var windowWidth = window.innerWidth; | |
var windowHeight = window.innerHeight; | |
var userAgent = navigator.userAgent; | |
var location = window.location.href; | |
var info = `Window: ${windowWidth}x${windowHeight} | |
User Agent: ${userAgent} | |
Location: ${location}`; |
// Enum for language codes | |
var languageListsGoogleCaptchaEnum = { | |
Arabic: 'ar', | |
Afrikaans: 'af', | |
Amharic: 'am', | |
Armenian: 'hy', | |
Azerbaijani: 'az', | |
Basque: 'eu', | |
Bengali: 'bn', | |
Bulgarian: 'bg', |
// takes a {} object and returns a FormData object | |
var objectToFormData = function(obj, form, namespace) { | |
var fd = form || new FormData(); | |
var formKey; | |
for(var property in obj) { | |
if(obj.hasOwnProperty(property)) { | |
if(namespace) { |
I hereby claim:
To claim this, I am signing this object:
$field - the name of field to aggregate | |
$firstChars - the first letters to search aggregations values by | |
$data = [ | |
'query' => [ | |
'bool' => [ | |
'must' => [ | |
'query_string' => [ | |
'query' => $field . ':' . $firstChars . '*' | |
] |