Skip to content

Instantly share code, notes, and snippets.

View kdrdmr's full-sized avatar

Kadri Demir kdrdmr

  • İstanbul, Turkey
View GitHub Profile
@skinsch
skinsch / Varnish Cheat Sheet
Last active November 9, 2023 11:12
Varnish Quick Reference Commands
# Check this too
# https://docs.fastly.com/guides/vcl/vcl-regular-expression-cheat-sheet
Health check backend servers:
varnishadm debug.health
Show requests that generate a 404 error:
varnishlog -q 'RespStatus == "404"'|egrep -i "ReqURL|ReqHeader Host:|Forwarded-For"
Show full requests for any 404 errors, 503, etc...
@aaronk6
aaronk6 / jquery-ajax-blob-arraybuffer.js
Last active June 1, 2020 19:10 — forked from SaneMethod/jquery-ajax-blob-arraybuffer.js
This fork supports request headers and returns text data if the request fails.
/**
* Register ajax transports for blob send/recieve and array buffer send/receive via XMLHttpRequest Level 2
* within the comfortable framework of the jquery ajax request, with full support for promises.
*
* Notice the +* in the dataType string? The + indicates we want this transport to be prepended to the list
* of potential transports (so it gets first dibs if the request passes the conditions within to provide the
* ajax transport, preventing the standard transport from hogging the request), and the * indicates that
* potentially any request with any dataType might want to use the transports provided herein.
*
* Remember to specify 'processData:false' in the ajax options when attempting to send a blob or arraybuffer -