defaults write com.apple.finder CreateDesktop false; killall Finder
This file contains 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
# 1. Compress a video to the smallest possible size | |
ffmpeg -i input.mp4 -vf "scale=iw/2:ih/2" -c:v libx265 -preset ultrafast -crf 28 -c:a aac -b:a 64k output.mp4 | |
# 2. Remove audio from a video | |
ffmpeg -i input.mp4 -an output.mp4 | |
# 3. Convert a video to a GIF | |
ffmpeg -i input.mp4 -vf "fps=10,scale=320:-1:flags=lanczos" output.gif | |
# 4. Convert a specific part of a video to a GIF (from 30s, duration 10s) |
This file contains 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
import os | |
import shutil | |
from tqdm import tqdm | |
gb_games = [] | |
gbc_games = [] | |
folder_path = "/Users/wotori/Documents/ROMS/GB/" |
This file contains 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
import os | |
import shutil | |
from datetime import datetime | |
from tqdm import tqdm | |
source = "/from" | |
dest = "/to" | |
dist_set = set() | |
file_count = 0 |
pg_dump --dbname=postgresql://postgres:DB_PASSWORD@DB_HOST:DB_PORT/DB_NAME -f ~/backup.sql
pg_dump --dbname=postgresql://postgres:DB_PASSWORD@DB_HOST:DB_PORT/DB_NAME | psql -U postgres DB_NAME
docker exec local_pg_container bash -c "pg_dump --dbname=postgresql://postgres:DB_PASSWORD@DB_HOST:DB_PORT/DB_NAME | psql -U postgres DB_NAME"
for i in .avi; do ffmpeg -i "$i" "${i%.}.mp4"; done
-vf yadif -c:v libx264 -preset slow -crf 19 -c:a aac -b:a 256k
for i in *.avi; do ffmpeg -i "$i" -vf yadif -c:v libx264 -preset slow -crf 19 -c:a aac -b:a 256k "${i%.avi}.mp4"; done
This file contains 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
# from here https://askubuntu.com/questions/59356/how-do-i-get-chinese-input-to-work | |
sudo apt-get install ibus-pinyin; | |
# or | |
sudo apt-get install ibus-sunpinyin; | |
This file contains 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
# reduce animation | |
dconf write /org/gnome/desktop/interface/enable-animations false |
This file contains 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
video to gif | |
``` | |
ffmpeg -ss 0 -t 10 -i enter.mp4 -vf "fps=10,scale=500:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 enter.gif | |
``` |
This file contains 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
git filter-branch --index-filter 'git rm -rf --cached --ignore-unmatch path_to_file' HEAD |
NewerOlder