Discover gists
#pragma once | |
// | |
// Magic Ring Buffer | |
// https://gist.github.com/mmozeiko/3b09a340f3c53e5eaed699a1aea95250 | |
// | |
// Sets up memory mapping so the same memory block follows itself in virtual address space: | |
// | |
// [abcd...xyz][abc...xyz] | |
// |
{ | |
"Use state": { | |
"scope": "javascriptreact,typescriptreact", | |
"prefix": "ush", | |
"body": [ | |
"let [${1}, set${1/(.*)/${1:/capitalize}/}] = useState($2);", | |
], | |
"description": "useState()" | |
} | |
} |
// three indices to efficiently support all lookups | |
function createDB() { | |
return {eav: new Map(), | |
ave: new Map(), | |
vea: new Map()}; | |
} | |
function addToIndex(xs, x, y, z, triple) { | |
let ys = xs.get(x); | |
if(ys == undefined) { |
function isGenerator(x) { | |
return x != null && typeof x.next === "function" | |
} | |
function isFrame(x) { | |
return x != null && x._type_ === 'call_frame' | |
} | |
function call(genFunc, ...args) { |
[ | |
{ | |
"code": "aa", | |
"name": "Afar", | |
"native": "Afar" | |
}, | |
{ | |
"code": "ab", | |
"name": "Abkhazian", | |
"native": "Аҧсуа" |
Example of a bare-minimum terraform script to setup an API Gateway endpoint that takes records and puts them into an SQS queue.
Start by creating the SQS queue.
resource "aws_sqs_queue" "queue" {
See here some of the API's you can use in your discord bot or anything. For any help or questions on how to use one, please contact the owner of the API and not me.
A much bigger list of APIs can be found here
[TOKEN] = API requires a token to access some if not all endpoints.
The descriptions are mostly copied from the API, sometimes personal or from the dev.
Graphic via State of Florida CFO Vendor Payment Search (flair.myfloridacfo.com)
This is a quick command I use to snapshot webpages that have a fun image I want to keep for my own collection of WTFViz. Why not just right-click and save the image? Oftentimes, the webpage in which the image is embedded contains necessary context, such as captions and links to important documentation just incase you forget what exactly that fun graphic was trying to explain.
- This can be awkward to setup - by default Prometheus will complain 4 targets are down.
- prometheus-community/helm-charts#812
- The majority of these fixes come from good work by @LanDinh who went through a similar process on windows: https://groups.google.com/g/prometheus-users/c/_aI-HySJ-xM/m/kqrL1FYVCQAJ
- The underlying cause is a problem with the way
kubeadm
sets up the default cluster: kubernetes/kubeadm#2388