Skip to content

Instantly share code, notes, and snippets.

@readonlychild
readonlychild / lambda-tile.js
Last active February 27, 2019 00:08
use lambda hosted osm tiles for pokebot
//change Pokebot.js:312 from
let path = MAIN.config.IMAGE_DIR+type+'_tiles/'+lat+','+lon+'.png';
//to
let path = 'https://2oj6lp60pe.execute-api.us-east-1.amazonaws.com/dev/map?lat='+lat+'&lng='+lon+'&z=15';
@readonlychild
readonlychild / tags.ts
Created May 24, 2022 23:20
Needle bot command for tagging threads
// ________________________________________________________________________________________________
//
// This file is part of Needle.
//
// Needle is free software: you can redistribute it and/or modify it under the terms of the GNU
// Affero General Public License as published by the Free Software Foundation, either version 3 of
// the License, or (at your option) any later version.
//
// Needle is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
@readonlychild
readonlychild / webp-detection.md
Last active August 19, 2022 03:04
image/webp detection

lamdba@edge

With the following lambda@edge, the server-side code can now check values for

  • headers['x-webp-support']
  • headers['x-avif-support']
  • headers['x-ix-bestf']

and make decisions for the response