View EventTarget
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class EventTarget { | |
constructor(options) { | |
if(options) { | |
Object.assign(this, options); | |
} | |
this.listeners = {}; | |
} | |
addEventListener (type, callback, useCaptureOptions) { | |
if (!(type in this.listeners)) { |
View After + First
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// see https://mongoplayground.net/p/hrVd5xrWBbh | |
db.collection.aggregate([ | |
{ | |
$match: { | |
...preconditions... | |
} | |
}, | |
{ | |
$sort: { | |
_id: 1 |
View Relay Cursor Spec Pagination in SQL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- --------------------- CREATE TABLE ------------------- | |
-- Table: public.pagination | |
CREATE TABLE IF NOT EXISTS public.pagination | |
( | |
uuid uuid NOT NULL DEFAULT gen_random_uuid(), | |
ts timestamp without time zone NOT NULL DEFAULT now(), | |
-- any columns | |
data jsonb NOT NULL, | |
View gist:b0c0b9d3918ef7cd71a5dc199975e756
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am zyclotrop-j on github. | |
* I am zyclotrop (https://keybase.io/zyclotrop) on keybase. | |
* I have a public key ASAkllhs7vILmYio6WAfl6tXemFysGVS5I7AsIPFJrKy3Qo | |
To claim this, I am signing this object: |