Shells that support process substitution such as bash and zsh allow to run shell script on gist as follows.
# With curl:
bash <(curl -sL ${GIST_URL}) args...
# With wget:| ## | |
| # Copyright (c) 2020 Valentin Weber | |
| # | |
| # After some minor modifications (as marked below) this EventGhost | |
| # Python script provides a method to send requests to devices | |
| # registered with the Join API <https://joaoapps.com/join/api/> from | |
| # any EventGhost Python Script or Command. | |
| # | |
| # EventGhost usage: `eg.globals.JoinPushDevice(text="hello_world")` | |
| ## |
All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.
| from notion.client import NotionClient | |
| import datetime | |
| import os | |
| from slugify import slugify | |
| import re | |
| import requests | |
| import time | |
| import hashlib | |
| import shutil | |
| import sys |
The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.
This means you have the following choices:
import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.await import(…) from CommonJS instead of require(…).This (and related gists) captures how i created my docker swarm architecture. This is intended mostly for my own notes incase i need to re-creeate anything later! As such expect some typos and possibly even an error...
Each major task has its own gist, this is to help with maitainability long term.
| <%* | |
| fastStart = async (filename, delayInSecond) => { | |
| if (tp.file.exists(filename)) { | |
| const f = tp.file.find_tfile(filename); | |
| let plugins = (await app.vault.read(f)).split(/\r?\n/); | |
| setTimeout(async () => { | |
| plugins.forEach(async (p) => await app.plugins.enablePlugin(p)) | |
| }, delayInSecond * 1000) | |
| } | |
| } |
In this tutorial, we will examine a regular expression for matching a URL. Using this example, we can begin to build a basic understanding of regular expressions, what each component represents, how they can be implemented in code to define search patterns, and how they can be used to validate that certain strings match specific criteria.
As previously stated, the following regular expression can be used to validate that a string is, in fact, a URL
/^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/
This is a Templater Startup Script for use in Obsidian.
Each time Obsidian is opened, Templater runs the script to see if a weekly, monthly, quarterly, and yearly file exists for the current date. If one exists, it moves on, if not, it creates the file using the appropriate template, in the appropriate place.
<%*
let wk = tp.date.now('GGGG-[W]WW');
let mnth = tp.date.now('MM MMMM');
let qrtr = tp.date.now('Qo [Quarter]');
let yr = tp.date.now('YYYY');| --- | |
| company: | |
| location: | |
| title: | |
| email: | |
| website: | |
| aliases: | |
| --- | |
| tags:: [[👥 People MOC]] |