Skip to content

Instantly share code, notes, and snippets.

@mattebb
mattebb / sync.js
Last active April 5, 2023 00:53
Waiting for webgl to finish rendering using fenceSync
// assembled from some stackoverflow answers
const start = performance.now();
// Draw the fullscreen quad
twgl.drawBufferInfo(gl, quad_bufferInfo);
let sync = gl.fenceSync(gl.SYNC_GPU_COMMANDS_COMPLETE, 0);
checkSync = () => {
@mattebb
mattebb / TezTok-getSaleStats.ql
Last active June 12, 2023 06:52 — forked from mariuswatz/TezTok-getSaleStats.ql
GraphQL query that will get buy and sell activities for a specified Tezos wallet for a given date range, including sale / buy sum totals and number of events.
# Copy the following GraphQL query into the TezTok API Explorer at
# https://graphiql.teztok.com/
# Fill out the wallet, date1 and date2 parameters with the Tezos address
# and date range you're interested in. The output combines events() and
# events_aggregate() query to give you a quick overview over sales and buys
# over the time period.
#
# Example: