brew install miniconda
conda config --remove channels defaults
conda config --add channels conda-forge
conda config --set channel_priority strictBefore changing the config, these are the default channels:
| --- | |
| /** | |
| * @file Custom element that wraps an inline SVG and swaps its content in or | |
| * out as the element enters or leaves the viewport, thus keeping the | |
| * DOM lean even when a lot of big-ass SVGs are used on a single page | |
| * (article lists with SVG heroes, for instance). | |
| */ | |
| import type { ImageMetadata } from 'astro' | |
| import { getImage } from 'astro:assets' | |
| import { experimental_AstroContainer as Container } from 'astro/container' |
| function getTypeName(x: unknown): string { | |
| return x === undefined ? 'Undefined' : x === null ? 'Null' : /^(?:class|function) (\w+)/.exec(x.constructor.toString())![1] | |
| } | |
| // Better? function Foo yields 'Function', class Foo yields 'Foo' | |
| function getTypeName(x: unknown): string { | |
| return ( | |
| x === undefined ? 'Undefined' : | |
| x === null ? 'Null' : | |
| /^(?:class) (\w+)/.exec(x.toString())?.[1] ?? |
| /bin/[ | |
| /bin/aa-enabled | |
| /bin/aa-exec | |
| /bin/aa-features-abi | |
| /bin/aclocal | |
| /bin/aclocal-1.16 | |
| /bin/addpart | |
| /bin/addr2line | |
| /bin/apt | |
| /bin/apt-cache |
| #!/usr/bin/env bash | |
| set -eu -o pipefail | |
| echo "Pruning local tracking branches that don't exist anymore on the remote…" | |
| git update | |
| echo "Pruning local branches that have been merged…" | |
| echo "Note: top-level branches are considered protected, only branches with a / in their name will be deleted." | |
| git branch --format '%(refname:lstrip=2)' --merged | grep '/' || true | xargs -n 1 git branch -d |
| Object.defineProperty(self, 'document', { value: {}, }) | |
| self.location = new URL('file:///nowhere') | |
| import 'https://cdn.jsdelivr.net/pyodide/v0.24.1/full/pyodide.asm.js' | |
| const { loadPyodide } = await import('https://cdn.jsdelivr.net/pyodide/v0.24.1/full/pyodide.mjs') | |
| const pyodide = await loadPyodide() | |
| await pyodide.loadPackage('micropip') | |
| const micropip = pyodide.pyimport('micropip') | |
| await Promise.all([ |
| export type SleepOptions = { | |
| signal?: AbortSignal | |
| /** If set, aborting will not fail the promise but instead fulfil it right away. */ | |
| skipOnAbort?: true | |
| } | |
| export const sleep = (ms: number, options?: SleepOptions) => | |
| new Promise<void>((ok, ng) => { | |
| // deno-lint-ignore prefer-const |
| /** | |
| * Implements buy-and-hold rebalancing by splitting some cash inflow into the | |
| * most meaningful contributions: | |
| * | |
| * The buckets whose valuations have fallen the most behind their target weight | |
| * are contributed to first. Then, contributions to the buckets with the largest | |
| * inflow from the previous step are prioritized, as to minimize the number of | |
| * transactions and thus transaction fees. | |
| * | |
| * @param values Range with the current valuation of the portfolio's constituents. |
| import chalk from 'chalk' | |
| import ora from 'ora' | |
| import process from 'node:process' | |
| const success = chalk.green.bold(`OK`) | |
| const failure = chalk.red.bold(`FAILED`) | |
| const excludeStackFragment = `(${new URL(import.meta.url).pathname}:` | |
| type TestBlock = (params: { test: TestFunction }) => unknown | |
| type TestFunction = (description: string, body: TestBlock) => void |