profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/mvasilkov/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.

KilledByAPixel/OS13k 432

A Fantasy OS and Tiny Game Engine

igor-alexandrov/rblog 47

Powerful and fast Ruby on Rails blog engine with some elements of social network.

mvasilkov/box2d-html5 19

A 2D Physics Engine for HTML5 Games

mvasilkov/Backbone.localStorage 6

A localStorage adapter for Backbone.js

mvasilkov/blast-js13k 6

HTML5 and JavaScript Game Development Competition in just 13 kB

mvasilkov/assert-equal-html 4

Assert the equality of two HTML fragments

mvasilkov/box2d-html5-old 3

(Deprecated) A 2D Physics Engine for HTML5 Games – new and improved version here: https://github.com/mvasilkov/box2d-html5

Infinidat/file-saver 2

An HTML5 saveAs() FileSaver implementation

startedwhid-injector/Focaccia-Board

started time in 6 hours

startedmvasilkov/kb

started time in 7 hours

startedAntowka/usbasp-v4.0-chinese-version

started time in 10 hours

starteduyjulian/onscripter-switch

started time in 13 hours

startedwetor/ONScripter-jh-Switch

started time in 13 hours

Pull request review commentmongodb/js-bson

UUID convenience class

-/**- * UUID regular expression pattern copied from `uuid` npm module.- * @see https://github.com/uuidjs/uuid/blob/master/src/regex.js- */-const UUID_RX = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;+import { Buffer } from 'buffer';+import { ensureBuffer } from './ensure_buffer';+import { Binary, BinaryExtended, BinaryExtendedLegacy } from './binary';+import { bufferToUuidHexString, uuidHexStringToBuffer, uuidValidateString } from './uuid_utils';+import type { EJSONOptions } from './extended_json';+import { randomBytes } from './parser/utils';  /** @public */-export interface UUIDExtended {+export type UUIDExtended = {   $uuid: string;-}+};++const BYTE_LENGTH = 16;++const kId = Symbol('id');  /**- * Parser function copied from `uuid` npm module.- * @see https://github.com/uuidjs/uuid/blob/master/src/parse.js- * @internal+ * A class representation of the BSON UUID type.+ * @public  */-export function parseUUID(uuid: string): Uint8Array {-  if (typeof uuid !== 'string') {-    throw new TypeError('Invalid type for UUID, expected string but got ' + typeof uuid);+export class UUID {+  _bsontype = 'UUID' as const;++  static cacheHexString: boolean;++  /** UUID Bytes @internal */+  private [kId]: Buffer;+  /** UUID hexString cache @internal */+  private __id?: string;++  /**+   * Create an UUID type+   *+   * @param input - Can be a 32 or 36 character hex string (dashes excluded/included) or a 16 byte binary Buffer.+   */+  constructor(input?: string | Buffer | UUID) {+    if (typeof input === 'undefined') {+      // The most common use case (blank id, new UUID() instance)+      this.id = UUID.generate();+    } else if (input instanceof UUID) {+      this[kId] = Buffer.from(input.id);+      this.__id = input.__id;+    } else if (ArrayBuffer.isView(input) && input.byteLength === BYTE_LENGTH) {+      this.id = ensureBuffer(input);+    } else if (typeof input === 'string') {+      this.id = uuidHexStringToBuffer(input);+    } else {+      throw new TypeError(+        'Argument passed in UUID constructor must be 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).'+      );+    }+  }++  /**+   * The UUID bytes+   * @readonly+   */+  get id(): Buffer {+    return this[kId];   } -  if (!UUID_RX.test(uuid)) {-    throw new TypeError('Invalid format for UUID: ' + uuid);+  set id(value: Buffer) {+    this[kId] = value;++    if (UUID.cacheHexString) {+      this.__id = bufferToUuidHexString(value);+    }+  }++  /**+   * Generate a 16 byte uuid v4 buffer used in UUIDs

Is this a good place to discuss how random data is generated?

steffenagger

comment created time in 13 hours

startedharryheman/Modern-HTML-Starter-Template

started time in 14 hours

PR opened mongodb/js-bson

UUID convenience class

UUID convenience class

Convenience class making uuid creations easier & typed, allowing:

const uuid1 = new UUID();
const uuid2 = new UUID('aaaaaaaa-aaaa-4aaa-aaaa-aaaaaaaaaaaa');
const uuid3 = new UUID('aaaaaaaaaaaa4aaaaaaaaaaaaaaaaaaa');

I've kept this PR as a draft, as there are still left in comments as // NOTE: that should be addressed.

Changes/approaches:

  • Introduced a UUID class (heavily inspired by the ObjectId class).
    • Reusing existing Binary logic. (maybe too much?)
  • The implementation is kept free of additional dependencies, despite (uuid looking as a solid candidate, uuid package still added as a dev-dependency for string validation in tests).
    • uuid works on/with strings. For validation I would then have to convert the underlying buffer into a string, this seemed wrong in relation to perfomance - it also dictates a locked string format (must include dashes e.g.: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx').
  • Expanded crypto detection to include global, for allowing packages such as react-native-get-random-values to populate implement global.crypto. getRandomValues in the context of React Native.
    • Question: Shouldn't randomBytes throw or warn when falling back to insecureRandomBytes?
  • value instanceof Buffer has been replaced with Buffer.isBuffer(value), as instanceof yields problems when multiple packages depends on Buffer implementations, in browser builds. (as each package is scoped)
+449 -54

0 comment

15 changed files

pr created time in a day

startedivan386/css-horizontal-blog

started time in a day

fork dcramer/go-links

The open source go links app at the core of Trotto.

https://www.trot.to

fork in a day

startedtrotto/browser-extension

started time in a day

startedtrotto/go-links

started time in a day

startedbitwarden/desktop

started time in a day

startedbarkm/bezier

started time in a day

push eventInfinidat/infi.pypi_manager

Roy Zmora

commit sha 1df85c6b4f71bab8cbd155e43cdf32da844965e1

Review fixes

view details

push time in a day

push eventInfinidat/infi.pypi_manager

Roy Zmora

commit sha 8223acaad110ee8e83f6c56dc474f64680563062

Review fixes

view details

push time in a day

create barnchInfinidat/infi.pypi_manager

branch : HOSTDEV-3356

created branch time in 2 days

PR opened primer/doctocat-template

Bump @primer/gatsby-theme-doctocat from 1.3.0 to 1.4.0

Bumps @primer/gatsby-theme-doctocat from 1.3.0 to 1.4.0.

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>

+48 -14

0 comment

2 changed files

pr created time in 2 days

release primer/doctocat

@primer/gatsby-theme-doctocat@1.4.0

released time in 2 days

created tagprimer/doctocat

tag@primer/gatsby-theme-doctocat@1.4.0

A Gatsby theme for building Primer documentation sites

created time in 2 days

CommitCommentEvent
CommitCommentEvent

push eventprimer/doctocat

github-actions[bot]

commit sha cca87130c68bc31d614c91fd57c6b19a4292f44c

Version Packages

view details

Manuel Puyol

commit sha 57692c4dd8cfd628bfebbb61c24195f2d20e4b44

Merge pull request #215 from primer/changeset-release/master Version Packages

view details

push time in 2 days

PR merged primer/doctocat

Version Packages

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to master, this PR will be updated.

Releases

@primer/gatsby-theme-doctocat@1.4.0

Minor Changes

+9 -11

1 comment

4 changed files

github-actions[bot]

pr closed time in 2 days

pull request commenthunterloftis/stoppable

Avoid using timer.unref

Note that the CI failure is unrelated to my change (it's not even the actual tests, just npm audit)

glasser

comment created time in 2 days

PR opened hunterloftis/stoppable

Avoid using timer.unref

Some environments where you might use stoppable don't implement timer.unref, such as the "jsdom" browser-compatibility mode of jest.

This uses clearTimeout instead of unref to fix issue #1 in a more compatible way which still passes the test added in #3.

+6 -1

0 comment

1 changed file

pr created time in 2 days

issue commenthunterloftis/stoppable

Suggestion to close remaining Connection gracefully without Grace

What problem does this solve? Doesn't the res.once('finish') handler deal with this?

vipreshjha

comment created time in 2 days

issue commenthunterloftis/stoppable

TypeError: setTimeout(...).unref is not a function

Could the call to unref be replaced by a call to clearTimeout in the server.close callback?

The point of unref is that it lets the Node process terminate if it's the only remaining thing. But that process isn't going to terminate until the server is closed (unless you've also unreffed the server, I guess?), so the first time it could possibly be relevant is after the server.close callback is done. So we might as well just call clearTimeout ourselves at that point, no?

akaRem

comment created time in 2 days

startedplibither8/2048.cpp

started time in 2 days