Skip to content

Instantly share code, notes, and snippets.

                                                                                                         confidence improvement accuracy (*)    (**)   (***)
util/text-decoder.js type='ArrayBuffer' n=100 len=16384 fatal=0 ignoreBOM=0 encoding='iso-8859-3'               ***     -8.97 %       ±1.74%  ±2.32%  ±3.02%
util/text-decoder.js type='ArrayBuffer' n=100 len=16384 fatal=0 ignoreBOM=0 encoding='latin1'                   ***     -6.81 %       ±2.78%  ±3.73%  ±4.90%
util/text-decoder.js type='ArrayBuffer' n=100 len=16384 fatal=0 ignoreBOM=0 encoding='utf-8'                    ***    -27.20 %       ±3.30%  ±4.39%  ±5.72%
util/text-decoder.js type='ArrayBuffer' n=100 len=16384 fatal=0 ignoreBOM=1 encoding='iso-8859-3'               ***     -7.95 %       ±2.52%  ±3.35%  ±4.37%
util/text-decoder.js type='ArrayBuffer' n=100 len=16384 fatal=0 ignoreBOM=1 encoding='latin1'                   ***     -8.82 %       ±1.84%  ±2.45%  ±3.18%
util/text-decoder.js type='ArrayBuffer' n=100 len=16384 fatal=0 ignoreBOM=1 
➜  node git:(deps/simdutf) ✗ node-benchmark-compare decoder.csv
                                                                                                         confidence improvement accuracy (*)    (**)   (***)
util/text-decoder.js type='ArrayBuffer' n=100 len=16384 fatal=0 ignoreBOM=0 encoding='iso-8859-3'               ***     -8.51 %       ±3.19%  ±4.26%  ±5.56%
util/text-decoder.js type='ArrayBuffer' n=100 len=16384 fatal=0 ignoreBOM=0 encoding='latin1'                   ***     -8.83 %       ±2.68%  ±3.57%  ±4.65%
util/text-decoder.js type='ArrayBuffer' n=100 len=16384 fatal=0 ignoreBOM=0 encoding='utf-8'                    ***    -25.31 %       ±5.46%  ±7.31%  ±9.60%
util/text-decoder.js type='ArrayBuffer' n=100 len=16384 fatal=0 ignoreBOM=1 encoding='iso-8859-3'               ***     -9.37 %       ±2.33%  ±3.10%  ±4.03%
util/text-decoder.js type='ArrayBuffer' n=100 len=16384 fatal=0 ignoreBOM=1 encoding='latin1'                   ***    -10.20 %       ±2.61%  ±3.48%  ±4.53%
util/text-de
@anonrig
anonrig / async-iterator.js
Created October 26, 2022 15:22
Async-iterator
const Stream = require('stream');
const { EventEmitter } = require('events');
const controller = new AbortController();
class Custom extends EventEmitter {
[Symbol.asyncIterator]() {
const stream = new Stream.Readable({
destroy(_error, callback) {
@anonrig
anonrig / get-review-threads.js
Created February 17, 2022 18:56
Get Review Threads using Github
import { graphql } from '@octokit/graphql'
/**
* @function getReviewThreads
* @param {{
* authorization: string,
* repository: {slug: string},
* organization: {slug: string},
* pull_request: {number: number}
* }} filters

Keybase proof

I hereby claim:

  • I am anonrig on github.
  • I am yagiznizipli (https://keybase.io/yagiznizipli) on keybase.
  • I have a public key ASAt2wISFMW53E4DHdkOFb82GbSDMerW9CMhUYq1SSos2wo

To claim this, I am signing this object:

@anonrig
anonrig / md
Created June 5, 2021 08:42
keybase.md
### Keybase proof
I hereby claim:
* I am yagiznizipli on github.
* I am yagiznizipli (https://keybase.io/yagiznizipli) on keybase.
* I have a public key ASA2rgyCL4gEB4CdjEqKG9MpqtuOaDslQAYzaSoOCgUfPgo
To claim this, I am signing this object:
@anonrig
anonrig / relevant-fruit-cla.md
Created March 16, 2020 00:57
Relevant Fruit CLA

Relevant Fruit Individual Contributor License Agreement ("Agreement")

In order to clarify the intellectual property license granted with Contributions from any person or entity, Relevant Fruit must have a Contributor License Agreement ("CLA") on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of Relevant Fruit and its users; it does not change your rights to use your own Contributions for any other purpose.

@anonrig
anonrig / subscription.sql
Last active January 23, 2020 14:34
subscription
SELECT
"SubscriberID",
"StandardSubscriptionDuration" as "SubscriptionDuration",
MIN("EventDate") as "FirstTransaction",
MAX("EventDate") as "LastTransaction",
"ApplicationId",
CASE
WHEN MAX("EventDate") BETWEEN LOCALTIMESTAMP - ("StandardSubscriptionDuration")::interval AND LOCALTIMESTAMP THEN true ELSE false
END AS "isActive"
FROM "Subscriptions"
@anonrig
anonrig / router.js
Created February 11, 2019 21:11
node.js aes example
const PromiseRouter = require('express-router-wrapper')
const router = new PromiseRouter()
const crypto = require('crypto')
const iv = process.env.VPN_AES_IV
const secret = process.env.VPN_AES_SECRET
router
.get('/', async (req, res) => {
const text = {key: "value"}
Computer Information:
Manufacturer: Apple
Model: MacPro6,1
Form Factor: Desktop
No Touch Input Detected
Processor Information:
CPU Vendor: GenuineIntel
CPU Brand: Intel(R) Xeon(R) CPU E5-1650 v2 @ 3.50GHz
CPU Family: 0x6