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
# mediainfo | |
#http://manpages.ubuntu.com/manpages/bionic/man1/mediainfo.1.html | |
# mediainfo --help | |
# mediainfo --Info-Parameters | |
.get the duration of video stream: | |
mediainfo --Inform="Video;%Duration%" [inputfile] | |
.get the duration of video stream as text: | |
mediainfo --Inform="Video;%Duration/String3%" [inputfile] | |
.get the duration of the media file: | |
mediainfo --Inform="General;%Duration%" [inputfile] |
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
#https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-redis-on-ubuntu-16-04 | |
#https://www.linode.com/docs/databases/redis/how-to-install-a-redis-server-on-ubuntu-or-debian8/ | |
#https://aws-labs.com/configure-redis-cluster-ubuntu-14-04/ | |
sudo apt-get update | |
sudo apt-get install build-essential tcl | |
cd /tmp | |
curl -O http://download.redis.io/redis-stable.tar.gz | |
tar xzvf redis-stable.tar.gz | |
cd redis-stable | |
make |
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
CREATE TEMP TABLE task | |
as | |
select * | |
from ( | |
VALUES | |
(1 :: int, 'Xліб' :: VARCHAR), | |
(2 :: int, 'Xліб' :: VARCHAR), | |
(3 :: int, 'Xліб' :: VARCHAR), | |
(4 :: int, 'Вино' :: VARCHAR), | |
(5 :: int, 'Вино' :: VARCHAR), |
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
DROP TABLE IF EXISTS categories; | |
DROP TABLE IF EXISTS product_categories; | |
DROP TABLE IF EXISTS products; | |
CREATE TEMP TABLE categories | |
as | |
select * | |
from ( | |
VALUES | |
(1 :: int, 'a' :: VARCHAR, null), | |
(2 :: int, 'b' :: VARCHAR, null), |
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
sudo nano /usr/sbin/pull | |
#!/bin/bash | |
# Load RVM into a shell session *as a function* | |
printf "Load RVM.\n" | |
if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then | |
# First try to load from a user install | |
source "$HOME/.rvm/scripts/rvm" | |
elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then | |
# Then try to load from a root install | |
source "/usr/local/rvm/scripts/rvm" |
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
. Update system | |
sudo apt update -y && sudo apt upgrade -y && sudo apt full-upgrade -y | |
. Install standart | |
sudo apt-get install -y libmagickwand-dev imagemagick ffmpeg libpq-dev htop curl git gem gnupg build-essential | |
*node.js(auto install npm) - https://nodejs.org/en/download/package-manager | |
curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash - | |
sudo apt-get install -y nodejs | |
sudo ln -sf /usr/bin/nodejs /usr/local/bin/node | |
. Install Rvm with Ruby and standart configureted | |
sudo gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB |
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
#acme | |
location ^~/.well-known { | |
default_type "text/plain"; | |
root /var/www/html; | |
} | |
events { | |
worker_connections 768; #10000 Load balancer | |
multi_accept on; | |
} | |
#Load balancer redirect http to https and http to www-version |
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
touch /lib/systemd/system/sidekiq.service | |
# Run: | |
# - systemctl enable sidekiq | |
# - systemctl {start,stop,restart} sidekiq | |
# | |
# This file corresponds to a single Sidekiq process. Add multiple copies | |
# to run multiple processes (sidekiq-1, sidekiq-2, etc). | |
# | |
# See Inspeqtor's Systemd wiki page for more detail about Systemd: | |
# https://github.com/mperham/inspeqtor/wiki/Systemd |
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
sudo nano /etc/init.d/sidekiq | |
#!/bin/sh | |
# File: /etc/init.d/sidekiq | |
### BEGIN INIT INFO | |
# Provides: unicorn | |
# Required-Start: $local_fs $remote_fs $network $syslog | |
# Required-Stop: $local_fs $remote_fs $network $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the sidekiq |
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
DROP TABLE IF EXISTS histories; | |
CREATE TEMP TABLE histories | |
as | |
select * | |
from ( | |
VALUES | |
(1::int, 1::int, 'status_1'::VARCHAR), | |
(2::int, 1::int, 'status_1'::VARCHAR), | |
(3::int, 1::int, 'status_1'::VARCHAR), | |
(4::int, 2::int, 'status_2'::VARCHAR), |
OlderNewer