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
| <?php | |
| declare( strict_types=1 ); | |
| $wp_dir = '/application/www/wp/'; | |
| $preload_patterns = [ | |
| $wp_dir . "wp-includes/Text/Diff/Renderer.php", | |
| $wp_dir . "wp-includes/Text/Diff/Renderer/inline.php", | |
| $wp_dir . "wp-includes/SimplePie/**/*.php", | |
| $wp_dir . "wp-includes/SimplePie/*.php", |
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
| background #e8e9ec | |
| foreground #33374c | |
| selection_background #d2d4dd | |
| selection_foreground #33374c | |
| cursor #33374c | |
| cursor_text_color #e8e9ec | |
| # white |
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
| // If the user has been on the page for over 12 hours, the next link | |
| // click will do a full page transition to get new code | |
| import React from "react"; | |
| import { BrowserRouter, useLocation } from "react-router-dom"; | |
| let hour = 3600000; | |
| export default function StaleAppRouter(props) { | |
| let [isStale, setIsStale] = useState(false); |
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
| # Usage: | |
| # Copy this file with the same name "note-link-janitor-gh-action-workflow.yml" to the <repo>/.github/workflows/ folder | |
| # I keep all my *.md files in SRC and run janitor only on that folder. If you keep it in the root of repository or any other folder, feel free to update it on line 37 of this file | |
| # The workflow gets triggered every time you push to your repository | |
| name: note-link-janitor-gh-action-workflow | |
| # Run this workflow every time a new commit pushed to your repository | |
| on: push | |
| jobs: |
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
| import path from "node:path"; | |
| import fse from "fs-extra"; | |
| import svgstore from "svgstore"; | |
| import { glob } from "glob"; | |
| import prettier from "prettier"; | |
| let HEROICONS_PATH = path.join(process.cwd(), "node_modules/heroicons"); | |
| let ASSETS_PATH = path.join(process.cwd(), "assets"); | |
| let OUTFILE = path.join(process.cwd(), "app/components/sprite/index.svg"); |
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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Single File Web Component</title> | |
| </head> | |
| <body> | |
| <template id=single-file> | |
| <style> | |
| h1 { |
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 chars = [...'0123456789abcdefghijklmnopqrstuvwxyz']; | |
| const charsMap = Object.fromEntries(chars.map((letter, i) => [letter, i])); | |
| /** | |
| * Function that encodes a string using mulberry32. | |
| * @param what What do you want to encode? | |
| * @param seed Pick a seed, any seed. | |
| * @returns Encoded string. | |
| */ | |
| export const encode = (what: string, seed: number) => { |
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
| /* | |
| Made by Elly Loel - https://ellyloel.com/ | |
| With inspiration from: | |
| - Josh W Comeau - https://courses.joshwcomeau.com/css-for-js/treasure-trove/010-global-styles/ | |
| - Andy Bell - https://piccalil.li/blog/a-modern-css-reset/ | |
| - Adam Argyle - https://unpkg.com/open-props@1.3.16/normalize.min.css / https://codepen.io/argyleink/pen/KKvRORE | |
| Notes: | |
| - `:where()` is used to lower specificity for easy overriding. | |
| */ |
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
| export default function MyMessage({ html, state }) { | |
| const { attrs } = state | |
| const { message='' } = attrs | |
| return html` | |
| <h1>${ message }</h1> | |
| <script type="module"> | |
| class MyMessage extends HTMLElement { | |
| constructor() { | |
| super() |
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
| import invariant from "tiny-invariant"; | |
| class AmalgoBox extends HTMLElement { | |
| get input() { | |
| return this.querySelector("input") as HTMLInputElement; | |
| } | |
| get button() { | |
| return this.querySelector("button") as HTMLButtonElement; | |
| } |