Skip to content

Instantly share code, notes, and snippets.

View gist:a2d1a5f24b762eb565196522f4700b8d
static norm(value, min, max) {
return (value - min) / (max - min);
}
static lerp(norm, min, max) {
return ((max - min) * norm) + min;
}
static map(value, sourceMin, sourceMax, destMin, destMax) {
return this.lerp(this.norm(value, sourceMin, sourceMax), destMin, destMax);
View gist:73ece7d56233591f6f3d
GET /v1/merchants/6ee88776-4e14-4054-9f64-fe326ba8dfea HTTP/1.1
Host: testpay.caspeco.net
digest: SHA-256=47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=
Authorization: Signature keyId="airdine",algorithm="hmac-sha256",headers="(request-target) host date digest",signature="zJ2ELqN9bHEKjMdwUfiJ4I5DSua7b72O/hQt/70UciY="
Accept-Encoding: gzip, deflate
x-flash-version: 19,0,0,169
Date: Thu, 07 Jan 2016 11:53:30 GMT
Accept: application/json; charset=utf-8
Accept-Language: en-us
User-Agent: AirDine
View gist:034f2a608f5da7c11671
<!DOCTYPE html>
<html>
<head>
<title>Object reference not set to an instance of an object.</title>
<meta name="viewport" content="width=device-width" />
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }