This file contains 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 logColor(color, args) { | |
console.log(`%c ${args.join(' ')}`, `color: ${color}`); | |
} | |
const log = { | |
aliceblue: (...args) => { logColor('aliceblue', args)}, | |
antiquewhite: (...args) => { logColor('antiquewhite', args)}, | |
aqua: (...args) => { logColor('aqua', args)}, | |
aquamarine: (...args) => { logColor('aquamarine', args)}, | |
azure: (...args) => { logColor('azure', args)}, |
This file contains 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
# MIT License | |
# | |
# Copyright (c) 2024 David Gilbertson | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
This file contains 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
/* Obsidian CSS reference: https://docs.obsidian.md/Reference/CSS+variables/Editor/Code */ | |
body { | |
/* Code syntax highlighting */ | |
--jetbrains-grey-code: #BCBEC4; | |
--code-normal: --jetbrains-grey-code; | |
--code-comment: #7A7E85; | |
--code-function: --jetbrains-grey-code; | |
--code-important: hotpink; | |
--code-keyword: #CF8E6D; |
This file contains 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 http2 = require('http2'); | |
const fs = require('fs'); | |
const path = require('path'); | |
const zlib = require('zlib'); | |
const brotli = require('brotli'); // npm package | |
const PORT = 3032; | |
const BROTLI_QUALITY = 11; // slow, but we're caching so who cares | |
const STATIC_DIRECTORY = path.resolve(__dirname, '../dist/'); | |
const cache = {}; |
This file contains 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 static com.intellij.openapi.util.text.StringUtil.escapeStringCharacters as escapeStr | |
SEPARATOR = ", " | |
QUOTE = "\"" | |
NEWLINE = System.getProperty("line.separator") | |
def record(columns, dataRow) { | |
OUT.append(" {").append(NEWLINE) | |
columns.eachWithIndex { column, idx -> |
This file contains 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
module.exports = { | |
entry: { | |
main: path.resolve(__dirname, 'src/index.js'), | |
ProductList: path.resolve(__dirname, 'src/ProductList/ProductList.js'), | |
ProductPage: path.resolve(__dirname, 'src/ProductPage/ProductPage.js'), | |
Icon: path.resolve(__dirname, 'src/Icon/Icon.js'), | |
}, | |
output: { | |
path: path.resolve(__dirname, 'dist'), |
This file contains 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
Word | Deconstruction | |
---|---|---|
it's | it ~is | |
years | year ~s | |
going | go ~ing | |
that's | that ~is | |
i'm | i ~am | |
things | thing ~s | |
states | state ~s | |
including | include ~ing | |
called | call ~ed |
This file contains 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
@mixin for-phone-only { | |
@media (max-width: 599px) { @content; } | |
} | |
@mixin for-tablet-portrait-up { | |
@media (min-width: 600px) { @content; } | |
} | |
@mixin for-tablet-landscape-up { | |
@media (min-width: 900px) { @content; } | |
} | |
@mixin for-desktop-up { |
This file contains 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 path = require('path'); | |
module.exports = { | |
entry: path.resolve(__dirname, 'src/index.js'), | |
output: { | |
path: path.resolve(__dirname, 'dist'), | |
filename: '[name].[contenthash].js', | |
}, | |
optimization: { | |
splitChunks: { |
This file contains 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 path = require('path'); | |
const webpack = require('webpack'); | |
module.exports = { | |
entry: path.resolve(__dirname, 'src/index.js'), | |
plugins: [ | |
new webpack.HashedModuleIdsPlugin(), // so that file hashes don't change unexpectedly | |
], | |
output: { | |
path: path.resolve(__dirname, 'dist'), |
NewerOlder