Skip to content

Instantly share code, notes, and snippets.

View codingEzio's full-sized avatar
👨‍💻
Still Learning

!Mensch codingEzio

👨‍💻
Still Learning
View GitHub Profile
@codingEzio
codingEzio / safari-export-readinglist.sh
Last active September 1, 2018 00:47 — forked from andphe/gist:3232343
Export your links from Safari reading list
/usr/bin/plutil -convert xml1 -o - ~/Library/Safari/Bookmarks.plist | grep -E -o '<string>http[s]{0,1}://.*</string>' | grep -v icloud | sed -E 's/<\/{0,1}string>//g'

API workthough

  1. Open a browser

    # start an instance of firefox with selenium-webdriver
    driver = Selenium::WebDriver.for :firefox
    # :chrome -> chrome
    # :ie     -> iexplore
    
  • Go to a specified URL
@codingEzio
codingEzio / vue-tmpl
Last active August 9, 2019 09:28
Vue boilerplate
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<title>0</title>
</head>
@codingEzio
codingEzio / ffmpeg_mkv_mp4_conversion.md
Created October 22, 2020 03:35 — forked from jamesmacwhite/ffmpeg_mkv_mp4_conversion.md
Easy way to convert MKV to MP4 with ffmpeg

Converting mkv to mp4 with ffmpeg

Essentially just copy the existing video and audio stream as is into a new container, no funny business!

The easiest way to "convert" MKV to MP4, is to copy the existing video and audio streams and place them into a new container. This avoids any encoding task and hence no quality will be lost, it is also a fairly quick process and requires very little CPU power. The main factor is disk read/write speed.

With ffmpeg this can be achieved with -c copy. Older examples may use -vcodec copy -acodec copy which does the same thing.

These examples assume ffmpeg is in your PATH. If not just substitute with the full path to your ffmpeg binary.

Single file conversion example

# E: excution
# P: process
# M: meta
# https://github.com/rothgar/mastering-zsh/blob/master/docs/helpers/aliases.md#global-aliases
alias -g YT_E_UA=''
alias -g YT_E_TR='--no-check-certificate --retries 2' # Exec (Re)Try
alias -g YT_E_NM='--restrict-filenames' # Exec Sanitize Name
alias -g YT_P_M_MP4='--merge-output-format mp4' # Process Merge
alias -g YT_P_M_MKV='--merge-output-format mkv' # Process Merge
alias -g YT_M_V='--verbose' # Meta Verbose