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 curl
# NOTICE: to get Nginx+Unicorn best-practices configuration see the gist https://gist.github.com/3052776 | |
$ cd /usr/src | |
$ wget http://nginx.org/download/nginx-1.2.1.tar.gz | |
$ tar xzvf ./nginx-1.2.1.tar.gz && rm -f ./nginx-1.2.1.tar.gz | |
$ wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.30.tar.gz | |
$ tar xzvf pcre-8.30.tar.gz && rm -f ./pcre-8.30.tar.gz | |
$ wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz |
function getGreetingTime (m) { | |
var g = null; //return g | |
if(!m || !m.isValid()) { return; } //if we can't find a valid or filled moment, we return. | |
var split_afternoon = 12 //24hr time to split the afternoon | |
var split_evening = 17 //24hr time to split the evening | |
var currentHour = parseFloat(m.format("HH")); | |
if(currentHour >= split_afternoon && currentHour <= split_evening) { |
# 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. |
<!doctype html> | |
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ --> | |
<html> | |
<head> | |
<title>iOS 8 web app</title> | |
<!-- CONFIGURATION --> |
SELECT 'SELECT SETVAL(' ||quote_literal(S.relname)|| ', MAX(' ||quote_ident(C.attname)|| ') ) FROM ' ||quote_ident(T.relname)|| ';' | |
FROM pg_class AS S, pg_depend AS D, pg_class AS T, pg_attribute AS C | |
WHERE S.relkind = 'S' | |
AND S.oid = D.objid | |
AND D.refobjid = T.oid | |
AND D.refobjid = C.attrelid | |
AND D.refobjsubid = C.attnum | |
ORDER BY S.relname; |
{ | |
// http://eslint.org/docs/rules/ | |
"ecmaFeatures": { | |
"binaryLiterals": false, // enable binary literals | |
"blockBindings": false, // enable let and const (aka block bindings) | |
"defaultParams": false, // enable default function parameters | |
"forOf": false, // enable for-of loops | |
"generators": false, // enable generators | |
"objectLiteralComputedProperties": false, // enable computed object literal property names |
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:
<div class="container"> | |
<div class="row"> | |
<div class="col-sm-6 col-md-4 col-md-offset-4"> | |
<h1 class="text-center login-title">Sign in to continue to Bootsnipp</h1> | |
<div class="account-wall"> | |
<img class="profile-img" src="https://lh5.googleusercontent.com/-b0-k99FZlyE/AAAAAAAAAAI/AAAAAAAAAAA/eu7opA4byxI/photo.jpg?sz=120" | |
alt=""> | |
<form class="form-signin"> | |
<input type="text" class="form-control" placeholder="Email" required autofocus> | |
<input type="password" class="form-control" placeholder="Password" required> |