Value | Color |
---|---|
\e[0;30m | Black |
\e[0;31m | Red |
\e[0;32m | Green |
\e[0;33m | Yellow |
\e[0;34m | Blue |
\e[0;35m | Purple |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# psql -h localhost postgres | |
postgres=# create database mydb_test with lc_collate='C'; | |
ERROR: new collation (C) is incompatible with the collation of the template database (ru_RU.UTF-8) | |
HINT: Use the same collation as in the template database, or use template0 as template. | |
postgres=# UPDATE pg_database SET datallowconn = TRUE WHERE datname = 'template0'; | |
postgres=# create database mydb_test with lc_collate = 'C' template = template0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen [::]:80; | |
listen 80; | |
server_name app.example.com; | |
return 301 https://$server_name$request_uri; | |
} | |
server { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"log" | |
"net" | |
"net/mail" | |
"net/smtp" | |
"crypto/tls" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Backup files | |
#https://explainshell.com/explain?cmd=rsync+-azuv+--delete+--progress+--exclude+%27node_modules%27 | |
rsync -auvhp --delete --exclude=node_modules [source] [destination] | |
# Remove all node_modules folders | |
# https://explainshell.com/explain?cmd=find+.+-name+%22node_modules%22+-type+d+-prune+-exec+rm+-rf+%27%7B%7D%27+%2B | |
find . -name "node_modules" -type d -prune -exec rm -rf '{}' + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT nspname || '.' || relname AS "relation", | |
pg_size_pretty(pg_relation_size(C.oid)) AS "size" | |
FROM pg_class C | |
LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace) | |
WHERE nspname NOT IN ('pg_catalog', 'information_schema') | |
and nspname = 'public' | |
and relkind = 'r' | |
ORDER BY pg_relation_size(C.oid) DESC; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# With create-react-app, a self signed (therefore invalid) certificate is generated. | |
# 1. Create some folder in the root of your project | |
# 2. Copy your valid development certificate to this folder | |
# 3. Copy this file to the same folder | |
# 4. In you package.json, under `scripts`, add `postinstall` script that runs this file. | |
# Every time a user runs npm install this script will make sure to copy the certificate to the | |
# correct location | |
TARGET_LOCATION="./node_modules/webpack-dev-server/ssl/server.pem" |
Задача - сделать Excel-подобную таблицу с поддержкой простейших формул. Пересчёт значений в ячейках должен происходить сразу при потере фокуса и затрагивать только те ячейки, значения которых затронуты. Пересчитывать каждый раз всю таблицу (если нет необходимости) нельзя. Использовать чистый JS (ES6), HTML, CSS. Использовать стороннние фреймворки, библиотеки не надо. Только то, что предоставляет браузер. Будет проверяться на последней версии chrome (десктопный и мобильный).
Размер таблицы пусть будет 100x1000 (ШxВ)