Skip to content

Instantly share code, notes, and snippets.

View kristoferjoseph's full-sized avatar
🐈‍⬛

kj kristoferjoseph

🐈‍⬛
View GitHub Profile
import html from 'https://registry.begin.com/html'
export default function Login(state={}) {
return html`
<my-page>
<my-form>
<my-input></my-input>
<my-button>Submit</my-button>
</my-form>
</my-page>
@kristoferjoseph
kristoferjoseph / index.html
Created March 1, 2021 18:12
Color scale prototype
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<main>
<color-scale>
<form
@kristoferjoseph
kristoferjoseph / arc-grammar.js
Created December 4, 2020 23:44
Architect arc format grammar for Highlightjs
module.exports = function(hljs) {
const LITERALS = [
'true',
'false',
'null'
].join(' ')
const BUILTIN = {
className: 'built_in',
begin: '^@.*'
}
@kristoferjoseph
kristoferjoseph / gist:31643839117acf165273e3eac40ba5fa
Created November 26, 2020 21:38
Updated and sprankled Hemisu dark theme for Highlightjs
/* Hemisu Dark */
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
background: #282a36;
}
.hljs-comment,
.hljs-meta {
// THIS
```javascript
// NOT THIS
``` javascript
@kristoferjoseph
kristoferjoseph / gh-orgs-pagination.html
Last active October 7, 2020 18:48
List all repos for an organization using the GitHub API and pagination Link header.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>GET ALL REPOS</title>
<style>
* {
margin:0;
padding:0;
box-sizing: border-box;
@kristoferjoseph
kristoferjoseph / nested-components.js
Created July 22, 2020 16:56
Wishlist fot SSR html from tagged template literal
import html from 'super-cool-lib.js'
import child from './child.js'
export default function Parent(props) {
return html`
<x-parent>
<x-child></x-child>
</x-parent>
`
}
@kristoferjoseph
kristoferjoseph / watch.ts
Last active May 4, 2022 19:33
deno file watcher test runner
import { exec } from "https://deno.land/x/exec/mod.ts";
const watcher = Deno.watchFs("./");
for await (const event of watcher) {
// if you're curious
// let kind = event.kind
// console.log('EVENT KIND: ', kind)
await exec('clear')
await exec('deno test --allow-read')
}
@kristoferjoseph
kristoferjoseph / dam-accordion.html
Created March 11, 2020 04:20
Dam Accordian Web Component
<template id="dam-accordian-template">
<style>
:host {
display: flex;
flex-direction: column;
font-family: sans-serif;
border: 1px solid #DDD;
border-radius: 2px;
box-shadow: 0 1px 2px rgba(0,0,0,0.25);
transition: box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);
@kristoferjoseph
kristoferjoseph / dam-counter.html
Created March 10, 2020 03:17
Stock JavaScript Web Component Counter
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Dam Counter</title>
</head>
<body>
<template id="dam-count-template">
<button class="dam-count-btn"></button>
</template>