Skip to content

Instantly share code, notes, and snippets.

View leobalter's full-sized avatar
💭
status

Leo Balter leobalter

💭
status
View GitHub Profile
@leobalter
leobalter / 1-setup.md
Created April 25, 2022 23:35 — forked from troyfontaine/1-setup.md
Signing your Git Commits using GPG on MacOS Sierra/High Sierra

Methods of Signing with GPG

Last updated March 28, 2021

There are now two ways to approach this:

  1. Using gpg and generating keys
  2. Using Kryptonite by krypt.co

This Gist explains how to do this using gpg in a step-by-step fashion. Kryptonite is actually wickedly easy to use-but you will still need to follow the instructions

--> HELLo!
var x = 2;
var y=42<!--x;
function z() {
return 'a';
}
with (new Proxy(globalThis, {})) {
function z() {
@leobalter
leobalter / _README.md
Last active March 17, 2021 00:35
VSCode terminal focus on off

Current

SuperCall : super Arguments

1. Let newTarget be GetNewTarget().
2. Assert: Type(newTarget) is Object.
3. Let func be ? GetSuperConstructor().
4. Let argList be ? ArgumentListEvaluation of Arguments.
5. Let result be ? Construct(func, argList, newTarget).
var p = Promise.resolve(1).then(v => console.log(v);
console.log(0);
await import('foo');
console.log(2);
p.then(() => console.log(3);
The WeakRef Constructor
https://tc39.github.io/proposal-weakrefs/#sec-weak-ref-constructor
- [ ] is the initial value of the WeakRef property of the global object.
- [ ] is designed to be subclassable. It may be used as the value in an extends clause of a class definition. Subclass constructors that intend to inherit the specified WeakRef behaviour must include a super call to the WeakRef constructor to create and initialize the subclass instance with the internal state necessary to support the WeakRef.prototype built-in methods.
WeakRef ( target )
https://tc39.github.io/proposal-weakrefs/#sec-weak-ref-target
1. [ ] If NewTarget is undefined, throw a TypeError exception.
function uniqBy(iter, mapFn) {
var map = new Map();
for (let item of iter) {
let key = mapFn(item);
// Use the first given key identifier
if (map.has(key)) {
continue;
}
```js
Object.setPrototypeOf(Array.prototype, new Int8Array(0));
const a = [];
a[0] = 4;
console.log(+a[0]);
```
---
`a[0] = 4;`
// Status of today + dynamic import() proposal, await unwraps namespace objects.
//--- a.js
export let then = async () => {/* code */};
//--- b.js
import * as ns from 'a.js';
async function fn() {
await Promise.resolve(ns); // should unwrap the "thenable" namespace

The "search" event

whatwg/html#667

Some browsers feature non-standard attributes incremental and onsearch for the <input type=search> elements. This also implies the search event being fired.

  • Specified? no
  • Proposed? no.
    • This link shows a refusal to propose the idea and reasons for it.
  • Is it a good idea? no.
  • The refusal to proposal the idea bases on the fact it's already redundant with the oninput and onsubmit event handlers