Category: Code

Run Webserver with current folder as root

Different ways to run a webserver using the current directory as root. Useful to serve static files.

Pass Command Line Arguments to npm

If you want to pass command line arguments to `npm` scripts, use the `–` separator.

Metadata/Frontmatter of current note in Obsidian

Get the metadata or the frontmatter of the currently open note in Obsidian plugin development.

Get selected text in Obsidian

Getting the currently selected text when creating an Obsidian plugin

Get current file content in Obsidian

Get currently open file and content when developing a plugin for Obsidian

Store Emoji in MySQL DB

If you want to store Emoji characters in a MySQL DB, you need to update the table encoding. You can…

HTML Native Autocomplete

HTML Native Autocomplete – no JavaScript necessary… <input type=”email” size=”40″ list=”defaultEmails”> <datalist id=”defaultEmails”> <option value=”jbond007@mi6.defence.gov.uk”> <option value=”jbourne@unknown.net”> <option value=”nfury@shield.org”> <option…

Intro summary and details tags in HTML5

A brief introduction to the <summary> and the <details> HTML5 Tags

Puppeteer and ShadowDOM

If you are testing an app – be it React, Angular or Vue – and you are using an library…

Iterate a Text File in Bash

This is how you iterate thru a text file outputting a line at a time in Bash shell scripting.