Source Info: https://linuxize.com/post/how-to-install-visual-studio-code-on-debian-10/
Install dependencies
sudo apt update
sudo apt install software-properties-common apt-transport-https curl| esphome: | |
| name: "air-quality-indoor" | |
| platform: ESP32 | |
| board: "featheresp32" | |
| wifi: | |
| ssid: "YOUR WIFI NETWORK NAME" | |
| password: "YOUR WIFI PASSWORD" | |
| logger: |
Source Info: https://linuxize.com/post/how-to-install-visual-studio-code-on-debian-10/
Install dependencies
sudo apt update
sudo apt install software-properties-common apt-transport-https curlImage.js from the source below (it is almost a copy of Image.js from tiptap-extensions
except that it has a constructor that accepts uploadFunc (function to be called with image being uploaded) and additional logic if(upload) { ... } else { ... previous base64 logic .. } in the new Plugin section.import {Node, Plugin} from 'tiptap'
import {nodeInputRule} from 'tiptap-commands'
/**
* Matches following attributes in Markdown-typed image: [, alt, src, title]
*| brew tap homebrew/versions | |
| brew cask install java | |
| brew search elasticsearch | |
| brew install elasticsearch@2.3 | |
| brew services start elasticsearch@2.3 |
| import { createCipheriv, createDecipheriv, randomBytes } from "crypto"; | |
| const ENCRYPTION_KEY: string = process.env.ENCRYPTION_KEY || ""; // Must be 256 bits (32 characters) | |
| const IV_LENGTH: number = 16; // For AES, this is always 16 | |
| /** | |
| * Will generate valid encryption keys for use | |
| * Not used in the code below, but generate one and store it in ENV for your own purposes | |
| */ | |
| export function keyGen() { |
| # Set the command-line arguments to pass to the server. | |
| ARGS='-web.listen-address=:9100 -collector.diskstats.ignored-devices="^(ram|loop|fd)\\d+$"' | |
| # Prometheus-node-exporter supports the following options: | |
| # -collector.diskstats.ignored-devices="^(ram|loop|fd|(h|s|v|xv)d[a-z])\\d+$": Regexp of devices to ignore for diskstats. | |
| # -collector.filesystem.ignored-mount-points="^/(sys|proc|dev)($|/)": Regexp of mount points to ignore for filesystem collector. | |
| # -collector.ipvs.procfs="/proc": procfs mountpoint. | |
| # -collector.megacli.command="megacli": Command to run megacli. | |
| # -collector.ntp.server="": NTP server to use for ntp collector. | |
| # -collector.textfile.directory="": Directory to read text files with metrics from. |
This is an example of using module tls in NodeJS to create a client securely connecting to a TLS server.
It is a modified version from documentation about TLS, in which:
| router.get('/', function(req, res, next) { | |
| models.Blog.findAll({ | |
| where: { | |
| published: true | |
| }, | |
| limit: 3, | |
| order: [["createdAt","DESC"]], | |
| include: [ | |
| { model: models.Photo } | |
| ] |
| // Returns the value at a given percentile in a sorted numeric array. | |
| // "Linear interpolation between closest ranks" method | |
| function percentile(arr, p) { | |
| if (arr.length === 0) return 0; | |
| if (typeof p !== 'number') throw new TypeError('p must be a number'); | |
| if (p <= 0) return arr[0]; | |
| if (p >= 1) return arr[arr.length - 1]; | |
| var index = (arr.length - 1) * p, | |
| lower = Math.floor(index), |
| // | |
| // LoadingOverlay.swift | |
| // app | |
| // | |
| // Created by Igor de Oliveira Sa on 25/03/15. | |
| // Copyright (c) 2015 Igor de Oliveira Sa. All rights reserved. | |
| // | |
| // Usage: | |
| // | |
| // # Show Overlay |