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
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
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
#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
# 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] |
NewerOlder