This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
/** | |
* Return zodiac sugn by month and day | |
* | |
* @param day | |
* @param month | |
* @return {string} name of zodiac sign | |
*/ | |
function getZodiacSign(day, month) { | |
var zodiacSigns = { |
1) in file /var/lib/pgsql/9.3/data/postgresql.conf change the default value 'localhost' to '*' (all) as shown | |
listen_addresses = '*' | |
2) in file /var/lib/pgsql/9.3/data/pg_hba.conf add line: | |
host all all all password | |
3) if it still does not work, you bet it's iptables fault. so either stop it temporarily to verify this or add an exception for port 5432 |
// the main app file | |
import express from "express"; | |
import loadDb from "./loadDb"; // dummy middleware to load db (sets request.db) | |
import authenticate from "./authentication"; // middleware for doing authentication | |
import permit from "./authorization"; // middleware for checking if user's role is permitted to make request | |
const app = express(), | |
api = express.Router(); | |
// first middleware will setup db connection |
# In YAML, this... | |
something: | |
- { name: test.example } | |
# ...is the same as this: | |
something: | |
- name: test.example | |
# And this: | |
something: |
axios({ | |
url: 'http://localhost:5000/static/example.pdf', | |
method: 'GET', | |
responseType: 'blob', // important | |
}).then((response) => { | |
const url = window.URL.createObjectURL(new Blob([response.data])); | |
const link = document.createElement('a'); | |
link.href = url; | |
link.setAttribute('download', 'file.pdf'); | |
document.body.appendChild(link); |
[Desktop Entry] | |
Version=1.0 | |
Name=Telegram Desktop | |
Comment=Official desktop version of Telegram messaging app | |
TryExec=/opt/Telegram/Telegram | |
Exec=/opt/Telegram/Telegram -- %u | |
Icon=telegram | |
Terminal=false | |
StartupWMClass=TelegramDesktop | |
Type=Application |
version: '2.1' | |
services: | |
php: | |
tty: true | |
build: | |
context: . | |
dockerfile: tests/Docker/Dockerfile-PHP | |
args: | |
version: cli | |
volumes: |
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
Ошибка: | |
.\venv\Scripts\activate : Невозможно загрузить файл C:\path\venv\Scripts\activate.ps1, так как выполнение сценариев отключено в этой системе. | |
Для получения дополнительных сведений см. about_Execution_Policies по адресу http://go.microsoft.com/fwlink/?LinkID=135170. | |
строка:1 знак:1 | |
.\venv\Scripts\activate | |
~~~~~~~~~~~~~~~~~~~~~~~ | |
CategoryInfo : Ошибка безопасности: (:) [], PSSecurityException | |
FullyQualifiedErrorId : UnauthorizedAccess | |
Решение проблемы: |