This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* debug.css | MIT License | zaydek.github.com/debug.css */ if (!("is_debugging" in window)) { is_debugging = false; var debug_el = document.createElement("style"); debug_el.append(document.createTextNode(`*:not(g):not(path) { color: hsla(210, 100%, 100%, 0.9) !important; background: hsla(210, 100%, 50%, 0.5) !important; outline: solid 0.25rem hsla(210, 100%, 100%, 0.5) !important; box-shadow: none !important; filter: none !important; }`)); } function enable_debugger() { if (!is_debugging) { document.head.appendChild(debug_el); is_debugging = true; } } function disable_debugger() { if (is_debugging) { document.head.removeChild(debug_el); is_debugging = false; } } !is_debugging ? enable_debugger() : disable_debugger(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "context" | |
| "database/sql" | |
| "encoding/base64" | |
| "encoding/json" | |
| "fmt" | |
| "time" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import "fmt" | |
| var ( | |
| Blackf = newColorf("\033[1;30m%s\033[0m") | |
| Redf = newColorf("\033[1;31m%s\033[0m") | |
| Greenf = newColorf("\033[1;32m%s\033[0m") | |
| Yellowf = newColorf("\033[1;33m%s\033[0m") | |
| Purplef = newColorf("\033[1;34m%s\033[0m") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| document.getElementsByClassName('slide sqs-gallery-design-stacked-slide')[0].getElementsByTagName('img')[0].src // " -> ' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const MarkdownArray = [ | |
| // `<Comment />`. | |
| { syntax: /^\/\/(.*)(?:$|\n)/, | |
| parser: (key, [children]) => <Comment key={key} children={parseText(children)} /> }, | |
| // `<Header />`. | |
| { syntax: /^(#{1,6})( .*)(?:$|\n)/, | |
| parser: (key, [open, children]) => <Header key={key} open={open} children={parseText(children)} /> }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // TODO | |
| // | |
| // add direct message e.g. | |
| // | |
| // - DirectMessage(userID, msg) | |
| // - a.DirectMessageService.New | |
| // - a.DirectMessageService.Destroy | |
| // | |
| // | |
| // add undo fns e.g. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * // https://cdpn.io/zaydek/debug/qBEqJaa/PNkvYKyZnVqA | |
| * const fontSizes = [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] | |
| * for (const fontSize of fontSizes) { | |
| * const em = (1 - fontSize / 16) / 20 | |
| * console.log(`[style*="font-size: ${fontSize}px"] { letter-spacing: ${em}em; }`) | |
| * } | |
| */ | |
| [style*="font-size: 10px"]:not([style*="font-family"]) { letter-spacing: 0.01875em; } | |
| [style*="font-size: 11px"]:not([style*="font-family"]) { letter-spacing: 0.015625em; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Compound component. | |
| // | |
| // https://codepen.io/zaydek/pen/PowjgOg | |
| const CodeBlock = props => ( | |
| <div style={stylex.parse("p-y:16 b:gray-100 br:8 overflow -x:scroll")}> | |
| {props.children.map((each, index) => ( | |
| <code key={each.key} style={{ ...stylex.parse("p-x:16 inline-block"), minWidth: "100%", ...codeLineStyle }}> | |
| <Syntax | |
| start={!index && props.open} | |
| end={index + 1 === props.children.length && "```"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <snippet> | |
| <content><![CDATA[ | |
| Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. | |
| ]]></content> | |
| <tabTrigger>Lorem</tabTrigger> | |
| </snippet> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function InterDynamicTracking(fontSize) { | |
| var a = -0.0223, b = 0.185, c = -0.1745; | |
| // tracking = a + b * e ^ (c * fontSize) | |
| return a + b * Math.pow(Math.E, c * fontSize) | |
| } | |
| // See rsms.me/inter/dynmetrics for reference. | |
| const A = -0.0223 // Don’t change. | |
| const B = 0.185 // Don’t change. | |
| const C = -0.1745 // Don’t change. |
NewerOlder