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
| # Ctrl+Alt+F1 | |
| # sudo systemctl stop lightdm.service | |
| # chmod 777 NVIDIA-Linux-x86_64-375.20.run | |
| # sudo sh NVIDIA-Linux-x86_64-375.20.run | |
| # ver 3.0 | |
| # Ctrl+Alt+F1 | |
| # sudo dpkg --add-architecture i386 | |
| # sudo apt update | |
| # sudo apt install build-essential libc6:i386 |
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://devhints.io/ffmpeg | |
| # Ringtone conversion using ffmpeg | |
| ffmpeg -i foo.mp3 -ac 1 -ab 128000 -f mp4 -acodec libfaac -y target.m4r | |
| # no audio | |
| ffmpeg -i input.mov -vcodec h264 -an -strict -2 output.mp4 | |
| ffmpeg -i input.mov -vcodec libvpx -an output.webm |
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://devhints.io/animated_gif | |
| mkdir -p gif | |
| mplayer -ao null -vo gif89a:outdir=gif $INPUT | |
| mogrify -format gif *.png | |
| gifsicle --colors=256 --delay=4 --loopcount=0 --dither -O3 gif/*.gif > ${INPUT%.*}.gif | |
| rm -rf gif | |
| # You’ll need mplayer, imagemagick and gifsicle. This converts frames to .png, then turns them into an animated gif. |
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.codeatcpp.com/2011/04/autocomplete.html | |
| int damerauLevenshteinDistance( const std::vector<char>& a, const std::vector<char>& b ) | |
| { | |
| const int a_size = static_cast<int>( a.size() ); | |
| const int b_size = static_cast<int>( b.size() ); | |
| const int INF = a_size + b_size; | |
| std::vector<std::vector<int> > H( a.size()+2, std::vector<int>( b.size()+2 ) ); | |
| H[0][0] = INF; | |
| for ( int i = 0; i <= a_size; ++i ) { H[i+1][1] = i; H[i+1][0] = INF; } |
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
| docker run --name pgsql-test -e POSTGRES_PASSWORD=password -d -p 6000:5432 postgress | |
| docker ps | |
| docker stop pgsql-test | |
| ---- | |
| // Запустить из докера компиляцию | |
| // https://habrahabr.ru/post/342218/ | |
| docker run --rm -it -v ~/go:/go -w /go/src/gifty golang:1.9.1 \ | |
| go build -o gifty_linux -v *.go |
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 | |
| for i in *.webm; do | |
| ffmpeg -i "$i" -vn -ab 128k -ar 44100 -y "`basename "$i" .webm`.mp3"; | |
| done |
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 | |
| for i in *.mp4; do | |
| ffmpeg -i "$i" -vn -acodec libmp3lame -ac 2 -qscale:a 4 -ar 48000 "`basename "$i" .mp4`.mp3" | |
| done |
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
| put =expand('%:p') |
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
| youtube-dl --extract-audio --audio-format mp3 --prefer-ffmpeg URL | |
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
| for i in *.ogg; do ffmpeg -i "$i" -f mp3 "${i%.*}.mp3"; done |