sudo chown -R USERNAME:USERNAME /path/to/laravel
sudo find /path/to/laravel -type f -exec chmod 644 {} \;
sudo find /path/to/laravel -type d -exec chmod 755 {} \;
cd /path/to/laravel
sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache
sudo usermod -a -G www-data USERNAME
| #!/bin/bash | |
| # Змінні | |
| INPUT_FILE="00010.m2ts" # Назва вхідного файлу | |
| OUTPUT_FORMAT="wav" # Вибір формату: "wav" або "flac" | |
| OUTPUT_DIR="./output" # Директорія для збереження виходу | |
| AUDIO_TRACK="0:1" | |
| # Створюємо директорію, якщо вона не існує | |
| mkdir -p "$OUTPUT_DIR/$OUTPUT_FORMAT" |
720p -> H.264 (x264) video + AAC 128kbps audio:
ffmpeg -i 00001.MTS -threads 3 -y -vcodec libx264 -sameq -acodec libfaac -ab 128k -ar 44100 -ac 2 -s 1280x720 -vpre normal -b 1M output.mp4
720p -> H.264 (x264) video + AAC 128kbps audio:
ffmpeg -i 00001.MTS -threads 3 -y -vcodec libx264 -sameq -acodec libfaac -ab 128k -ar 44100 -ac 2 -s 1280x720 -vpre normal -b 1M output.mp4
| # Criando um script .sh para executar todos os comandos: | |
| #root@servidor:~# vi script.sh | |
| #root@servidor:~# chmod +x script.sh | |
| #root@servidor:~# ./script.sh | |
| apt-get update | |
| apt-get -y install autoconf automake build-essential git-core libass-dev libgpac-dev libsdl1.2-dev libtheora-dev libtool libvdpau-dev libvorbis-dev libx11-dev libxext-dev libxfixes-dev pkg-config texi2html zlib1g-dev libmp3lame-dev nasm gcc yasm && true | |
| mkdir ~/ffmpeg_sources | |
| cd ~/ffmpeg_sources | |
| git clone --depth 1 git://github.com/mstorsjo/fdk-aac.git |
Maintaining even a small mongodb application in production requires regular backups of remotely stored data. MongoDB gives you three ways to acomplish it. In this post I'm using monogodump command for creating a backup and mongorestore for recreating the data.
The purpose of this writing is to provide a simple way of periodic database dumps from a remote server to a Dropbox cloud storage.
Remember that for using
mongodumpyou have to have amongodprocess running.
Suppose that you want make a backup of your books database.
To create a dump use mongodump -d books -o which will result in a book folder containing bson files with all collections.

