This file contains hidden or 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 | |
sudo yum -y update | |
sudo amazon-linux-extras install -y php7.4 | |
sudo yum install -y php-cli php-pdo php-fpm php-json php-mysqlnd php-dom php-gd php-simplexml php-xml php-opcache php-mbstring httpd | |
wget https://www.drupal.org/download-latest/tar.gz | |
tar -xzf tar.gz | |
mv drupal-* drupal | |
cd drupal | |
sudo rsync -avz . /var/www/html | |
sudo chown -R apache:apache /var/www/html |
This file contains hidden or 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
URL | Mobile (0-100) | Desktop (0-100) | Links | |
---|---|---|---|---|
https://diia.gov.ua/ | 70 | 96 | https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fdiia.gov.ua%2F&tab=desktop | |
https://thedigital.gov.ua/ | 22 | 59 | https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fthedigital.gov.ua%2F&tab=desktop | |
https://chamber.ua/ | 33 | 74 | https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fchamber.ua%2F&tab=desktop | |
https://eba.com.ua/ | 15 | 48 | https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Feba.com.ua%2F&tab=desktop | |
https://sup.org.ua/uk | 8 | 28 | https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fsup.org.ua%2Fuk&tab=desktop |
This file contains hidden or 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
const https = require("https"); | |
const { URL } = require("url"); | |
const webHookUrl = process.env.WEBHOOK_URL || "fakeWebhook"; | |
function publishSlackMessage({ message, webHook }) { | |
return new Promise(function (resolve) { | |
const url = new URL(webHook); | |
const reqOpts = {}; | |
reqOpts.hostname = url.hostname; | |
reqOpts.path = url.pathname; |
This file contains hidden or 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 | |
# check https://cloud.google.com/text-to-speech/docs/quickstart-protocol to get token (subtitles-xxx.json) file | |
export GOOGLE_APPLICATION_CREDENTIALS="/home/alan/proj/google/textToSpeach/subtitles-xxx.json" | |
# check https://cloud.google.com/sdk/docs/install | |
# to install gcloud cli | |
curl -X POST \ | |
-H "Authorization: Bearer "$(gcloud auth application-default print-access-token) \ | |
-H "Content-Type: application/json; charset=utf-8" \ |
This file contains hidden or 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
const text = require("./text.json"); | |
function toHHMMSS(seconds) { | |
var sec_num = parseInt(seconds, 10); // don't forget the second param | |
var hours = Math.floor(sec_num / 3600); | |
var minutes = Math.floor((sec_num - hours * 3600) / 60); | |
var seconds = sec_num - hours * 3600 - minutes * 60; | |
if (hours < 10) { | |
hours = "0" + hours; |