Skip to content

Instantly share code, notes, and snippets.

View jdanyow's full-sized avatar
💭
Confirming my whereabouts

Jeremy Danyow jdanyow

💭
Confirming my whereabouts
View GitHub Profile
@jdanyow
jdanyow / index.html
Created September 27, 2021 16:50
Printing example
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Standard page title</title>
<style>
@media print {
.hidden-print {
display: none;
}
@jdanyow
jdanyow / env.md
Last active September 10, 2021 10:15

Environment

APIs

  1. Lists
    /api/lists/*
    Purpose: Bookmarks, collections
    Hosts: docs.microsoft.com, ppe.docs.microsoft.com
    
@jdanyow
jdanyow / templating.md
Last active September 10, 2021 10:13
Templating - Docs Composition Service

Templating - Docs Composition Service

Writing down some thoughts about server-side templating solutions for Docs.

Today

Today Docs.Rendering & docs-render follow roughly the same process. This is by design, for the initial release of docs-render we're prioritizing backwards compatibility, template reuse, time to market.

The heavy parts of handling a request look roughly like this:

{
"docs.microsoft.com": {
"apiBrowser": "https://docs.microsoft.com/api/apibrowser",
"assessments": "https://docs.microsoft.com/api/assessments",
"assessmentsBranch": "https://review.docs.microsoft.com/api/assessments/branches",
"auth": {
"docs": "https://docs.microsoft.com/api/profiles/auth",
"github": "https://docs.microsoft.com/api/githubauth",
"identityPlatform": "https://login.microsoftonline.com/common/oauth2/v2.0/authorize",
"signOut": "https://docs.microsoft.com/api/profiles/signout",
<template>
<label repeat.for="option of options">
<input type="radio" name="periodOptions" model.bind="option" checked.bind="$parent.selectedOption" click.delegate="clicked()"/>
${option.text}
</label>
<p><pre><code>${selectedOption | stringify}</code></pre></p>
</template>
@jdanyow
jdanyow / app.html
Last active July 12, 2021 22:29
Aurelia Validation Demo
<template>
<form submit.delegate="submit()">
<!--<ul><li repeat.for="error of controller.errors">${error.message}</li></ul>-->
<div class="form-group">
<label class="control-label" for="first">First Name</label>
<input type="text" class="form-control" id="first" placeholder="First Name"
value.bind="firstName & validate">
</div>
left center right none
😊 😊 😊 😊
aaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaa
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>GistRun</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@primer/css@17.2.1/dist/primer.css" integrity="sha256-0PtaET8NN28OuNfpLRetkG6xdDLuTDYdIb8nZzpPLlQ=" crossorigin="anonymous">
<!-- UNCOMMENT FIX: -->
<!--
<style>
@jdanyow
jdanyow / index.html
Created May 29, 2021 17:28
planetscale logo dab
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>GistRun</title>
<style>
:root {
--duration: 1500ms;
--timing: cubic-bezier(.5,0,0,1)
}
import escape_html from "escape-html";
import { Readable } from "stream";
// following imports are for testing
import { createReadStream } from "fs";
import * as assert from "assert";
export class TemplateResult {
constructor(
public readonly strings: TemplateStringsArray,
public readonly values: unknown[]