Skip to content

Instantly share code, notes, and snippets.

View jyasskin's full-sized avatar
💭
Back on Monday

Jeffrey Yasskin jyasskin

💭
Back on Monday
View GitHub Profile
@jyasskin
jyasskin / both_canonized.n4
Last active January 2, 2024 23:44
How to remove restrictions from VCs
<did:key:123> <https://contexts.vcplayground.org/examples/gs1-8110-coupon/vocab#clippedCoupon> _:c14n3 .
<did:key:zDnaejUmiZqk8LrjB4iLd9SVF9zANU5A9YMdBiAKfgWbFGKdb> <https://schema.org/image> "https://vcplayground.org/examples/gs1-8110-coupon/logo.png" .
<did:key:zDnaejUmiZqk8LrjB4iLd9SVF9zANU5A9YMdBiAKfgWbFGKdb> <https://schema.org/name> "Local Coffee Shop" .
<did:key:zDnaejUmiZqk8LrjB4iLd9SVF9zANU5A9YMdBiAKfgWbFGKdb> <https://schema.org/url> "https://coffee.example.com" .
<https://vcplayground.org/credential/S2SUvnaXJEzZKoG-L-bxf> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://contexts.vcplayground.org/examples/gs1-8110-coupon/vocab#GS18110CouponCredential> .
<https://vcplayground.org/credential/S2SUvnaXJEzZKoG-L-bxf> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <https://www.w3.org/2018/credentials#VerifiableCredential> .
<https://vcplayground.org/credential/S2SUvnaXJEzZKoG-L-bxf> <https://schema.org/description> "Digital coupon: Buy one, get one free 16 oz coffees." .
<https://vcplayground
@jyasskin
jyasskin / Chrome ESCAPE position.md
Created June 5, 2019 21:21
Chrome's position on the ESCAPE workshop

Chrome's position on the ESCAPE workshop

Jeffrey Yasskin, Chrome team, 2019-06-05

I have been developing the Web Packaging specifications that live in https://github.com/WICG/webpackage. As of June 2019, Chrome has shipped an initial version of "Signed Exchanges" and is working on an implementation of "Bundles". Once the whole system is implemented, we expect it to allow publishers to sign bundles of content that can be distributed to customers in a variety of new ways, including peer-to-peer and via potentially-untrusted distributor websites, some of which will be large aggregators like Google or Facebook.

We expect this new distribution system to have several positive effects in connecting publishers with their readers:

  • When readers have restricted access to the global internet, whether through flaky connectivity, expensive connectivity, or government censorship, packages can be shared peer-to-peer, and the recipient can see a trustworthy description of the publisher of the content in their URL bar.
@jyasskin
jyasskin / event-targeting.md
Last active May 6, 2016 23:20
Patterns in directing events to particular globals

Patterns in directing events to particular globals

Push

The push event is only dispatched to a ServiceWorkerGlobalScope. Events are registered by calling serviceWorkerRegistration.pushManager.subscribe(...).

Background sync

The sync event is only dispatched to a ServiceWorkerGlobalScope. Events are registered by calling serviceWorkerRegistration.sync.register(...).

@jyasskin
jyasskin / instanceof_demo.html
Last active January 4, 2016 05:29
Running on localhost, this displays "Tag Name: CXX-FUNCTION; Instance of CxxFunctionElement: false", but when copied to jsbin, it shows "Tag Name: CXX-FUNCTION; Instance of CxxFunctionElement: true". I believe 'true' is the expected result.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<script src="//cdnjs.cloudflare.com/ajax/libs/polymer/0.1.3/platform.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/polymer/0.1.3/polymer.js"></script>
<polymer-element name="cxx-function" constructor="CxxFunctionElement" noscript>
<template>
<pre><code><content></content></code></pre>
$ clang++ -O1 -g test.cc -fno-omit-frame-pointer -o test && ~/src/chromium/src/third_party/valgrind/linux_x64/bin/valgrind ./test
==10069== Memcheck, a memory error detector
==10069== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==10069== Using Valgrind-3.9.0.SVN and LibVEX; rerun with -h for copyright info
==10069== Command: ./test
==10069==
==10069== Conditional jump or move depends on uninitialised value(s)
==10069== at 0x400597: main (test.cc:15)
==10069==
Yep.
static void
update_class_location(tree cls, location_t new_location)
{
tree instantiations, tmpl_info, tmpl_decl;
DECL_SOURCE_LOCATION (TYPE_NAME (cls)) = new_location;
if ((tmpl_info = CLASSTYPE_TEMPLATE_INFO (cls)))
{
tmpl_decl = TI_TEMPLATE (tmpl_info);
for (instantiations = DECL_TEMPLATE_INSTANTIATIONS (tmpl_decl);
instantiations;
# 1 "bad.h" 1
template <class A> struct MisplacedDbg;
# 1 "bad_partial.h"
template<class T> struct MisplacedDbg<T*>;
# 1 "bad_full.h"
struct Full;
template<> struct MisplacedDbg<Full>;
# 1 "util.h"
struct Arg;
typedef MisplacedDbg<Arg> Typedef1;
@jyasskin
jyasskin / notes.md
Created May 4, 2015 13:59
LEWG Lenexa Notes

Notes from the C++ Lenexa LEWG meeting

@jyasskin
jyasskin / designer.html
Created December 5, 2014 01:14
designer
<link rel="import" href="../paper-button/paper-button.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@jyasskin
jyasskin / designer.html
Last active August 29, 2015 14:10
designer
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../paper-item/paper-item.html">
<link rel="import" href="../paper-checkbox/paper-checkbox.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;