name: WriteFile version: 1.0.0 description: A plugin to write content to a file original_url: https://example.com/plugin/writeFile.md endpoints:
- path: /write-file method: POST handler: writeFileHandler
| ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC+IUXKEwgSAjypvuuedx8DqpIQrNtHcLWBFEnc24vWV1BApwDa57+bxAOKNTwk/QTOsmjDjyiiHNx532IW4Yg0+U/S0uFvHIlmpuFRst2rPloMktIPy2gOMXOqRhy8uwheGMP7FhXPZaivTYFJreLu1981ipMl5irhdo++FOU5G2DnSBIN1vqS1fR2zAEy1Nnc1Nabx0W5IoaIdAZJ5Z+I49XXq09pismxa6Mkx9otL6ijU7Jf7cH5RRoGj6BJQk/XuNdWpOCw1hWDOT3n5Gn6BGcdx0AoGD4DzqbNjXR1r9Wmjx26YEgNMC0iZRspKUUJMwhNa3TlA4u9N8RrAR0D [email protected] |
| <h2>Elephant</h2> | |
| <p> | |
| Elephants are the largest existing land animals. Three species are currently | |
| recognized: the African bush elephant, the African forest elephant, and the | |
| Asian elephant. | |
| </p> |
| /** | |
| * Represents a Marko tag name enclosed in angle brackets. | |
| * Used to define custom Marko tags within a taglib definition. | |
| */ | |
| type TagShorthand = `<${string}>`; | |
| /** | |
| * Represents a shorthand for defining repeated tag within a Marko tag. | |
| */ | |
| type RepeatedTag = `${TagShorthand}[]`; |
| .DS_Store | |
| # Logs | |
| logs | |
| *.log | |
| npm-debug.log* | |
| yarn-debug.log* | |
| yarn-error.log* | |
| lerna-debug.log* | |
| .pnpm-debug.log* |
| import { expandToChalkString } from './template-strings.ts'; | |
| const exit = (error: string, code: number = -1) => { | |
| console.info(eval(`expandToChalkString\`${error}\``)); | |
| process.exit(code); | |
| } | |
| import type { ForegroundColorName } from 'chalk'; | |
| const info = (msg: string, color: ForegroundColorName = 'yellow') => { |
name: WriteFile version: 1.0.0 description: A plugin to write content to a file original_url: https://example.com/plugin/writeFile.md endpoints:
| #!/usr/bin/env nu | |
| # Tail the last 50 lines of docker-compose logs and follow | |
| cat log.txt | lines | |
| | each { sed 's/^[^|]*| //' } | |
| | where { |line| $line =~ "^\{" } | |
| | each { from json } | |
| | each { |record| | |
| let t = $record.t."$date" | |
| let s = $record.s |
| #!/usr/bin/env nu | |
| # Tail the last 50 lines of docker-compose logs and follow | |
| cat log.txt | lines | |
| | each { sed 's/^[^|]*| //' } | |
| | where { |line| $line =~ "^\{" } | |
| | each { from json } | |
| | each { |record| | |
| let t = $record.t."$date" | |
| let s = $record.s |
| #!/bin/zsh | |
| ########################################################### | |
| # Get URLs for the current branch or the main branch | |
| # Adding a path after the command will show the URL of that file on the current branch and the main branch | |
| # | |
| # NOTE: this DOES NOT CHECK if the file exists on github | |
| #---------------------------------------------------------- | |
| # Examples: | |
| # ```bash |
Important
This is an executable Markdown file, an experiment of merging documentation and code together. A tool for running the code is under development. The focus of this document is to figure a syntax that does not get in the way of the code.
Original version from elijahmanor's gist