Skip to content

Instantly share code, notes, and snippets.

@yuraloginoff
yuraloginoff / ffmpeg.md
Last active Jun 25, 2021 — forked from protrolium/ffmpeg.md
ffmpeg guide
View ffmpeg.md

ffmpeg

Video compression - decrease size, maintain quality

ffmpeg -i original.mp4 -crf 28 compressed.mp4

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:

@yuraloginoff
yuraloginoff / input.sh
Last active Jun 6, 2020
#bash: Handling Input
View input.sh
#!/bin/bash
read -p "Enter your name : " name
echo "Hi, $name. Let us be friends!"
# read three numbers and assigned them to 3 vars
read -p "Enter number one : " n1
read -p "Enter number two : " n2
read -p "Enter number three : " n3
View switch.sh
#!/bin/bash
# use case statement to make decision for rental
case $rental in
"car") echo "For $rental rental is Rs.20 per k/m.";;
"van") echo "For $rental rental is Rs.10 per k/m.";;
"jeep") echo "For $rental rental is Rs.5 per k/m.";;
"bicycle") echo "For $rental rental 20 paisa per k/m.";;
"enfield") echo "For $rental rental Rs.3 per k/m.";;
"thunderbird") echo "For $rental rental Rs.5 per k/m.";;
@yuraloginoff
yuraloginoff / check-for-args.sh
Last active Jun 6, 2020
#bash: Check for cli arguments
View check-for-args.sh
#!/bin/bash
# Exit if no arguments
[ $# -eq 0 ] && { echo "Usage: $0 param name"; exit 1; }
# if no command line arg given
# set var to Unknown
if [ -z $1 ]
then
@yuraloginoff
yuraloginoff / Elementary-install.sh
Last active Jun 8, 2020
#linux: After installing of Elementary OS
View Elementary-install.sh
https://github.com/tonietto/Elementary-OS-First-Steps
https://elementaryos.stackexchange.com/questions/17452/how-to-display-system-tray-icons-in-elementary-os-juno
sudo mv /etc/xdg/autostart/nm-applet.desktop /etc/xdg/autostart/nm-applet.desktop-old
sudo apt-get install -y \
rename \
tldr \
git \
neofetch \
@yuraloginoff
yuraloginoff / .bashrc
Last active Jun 6, 2020
#bash: Customizing Bash environment and setup environment variables
View .bashrc
#
# Customizing Bash environment
#
# Correct dir spellings
shopt -q -s cdspell
# Make sure display get updated when terminal window get resized
shopt -q -s checkwinsize
@yuraloginoff
yuraloginoff / .bashrc
Last active Jun 6, 2020
#bash: shell aliases
View .bashrc
# If you want to add aliases for every user, place them either in /etc/bashrc or /etc/profile.d/useralias.sh file.
# Please note that you need to create /etc/profile.d/useralias.sh file.
alias c='clear'
alias d='date'
alias h='history'
# Update and install the newest versions of all packages currently installed on the Debian system.
alias update='sudo apt-get update && apt-get upgrade'
@yuraloginoff
yuraloginoff / Switch between shells
Last active Jun 12, 2020
#linux: Switch between shells
View Switch between shells
$ echo 'alias 2zsh="chsh -s $(which zsh)"' >> ~/.bashrc
$ echo 'alias 2bash="chsh -s $(which bash)"' >> ~/.zshrc
@yuraloginoff
yuraloginoff / .zshrc
Last active Jun 6, 2020
#linux:.zshrc
View .zshrc
ZSH_THEME="avit"
plugins=(npm extract vscode web-search z)
#################
# #
# ALIASES #
# #
#################