Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.
brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
// 1. Log in to your Amazon account | |
// 2. Go to your Content Library > Books - https://www.amazon.fr/hz/mycd/digital-console/contentlist/booksAll/dateDsc/ | |
// 3. Open your browser's Javascript console | |
// 4. For each page of books, paste this script into the console | |
(async function () { | |
// Close the notification if it appears | |
function closeNotification() { | |
const notifClose = document.querySelector("span#notification-close"); | |
if (notifClose) { |
#!/bin/bash | |
# Prerequisites: | |
# - macOS (for the sed syntax with -i '') | |
# - inkscape is installed | |
# - usage: INKSCAPE_PATH=/Applications/Inkscape.app/Contents/MacOS/inkscape ~/svgToPng.sh ./SVG '#7c0033' 'BURGUNDY' | |
# Function to check if a string is a valid hexadecimal RGB color | |
is_valid_hex_rgb() { |
# A function to replace the `code` command | |
# | |
# With args: does what's intended. | |
# ``` | |
# > code ~/.bash_history | |
# ``` | |
# | |
# With no args, opens the first workspace it founds | |
# in the current folder, or a new workspace based | |
# on the current folder if none exists. |
ffmpegboris() { | |
ffmpeg -i $1 -c:v libx264 -crf 23 -preset medium -c:a aac -b:a 128k -movflags +faststart -vf scale=-2:720,format=yuv420p $1.optimized.mp4 | |
} | |
ffmpegborisall () { | |
for i in *.(AVI|MP4|MOV|mov|mp4); do | |
if [[ ${i} != *"optimized"* ]];then | |
ffmpegboris $i; | |
fi | |
done |
/** | |
* Get the git branch | |
* @return mixed Either the branch name or the HEAD content or a boolean false | |
*/ | |
function get_current_git_commit() { | |
if ( $hash = file_get_contents( get_home_path().'.git/HEAD' ) ) { | |
preg_match('/ref: refs\/heads\/(.*)/', $hash, $matches, PREG_OFFSET_CAPTURE); | |
if(count($matches)>=2) { | |
return $matches[1][0]; | |
} else { |
{ | |
// Police à ligature | |
"editor.fontFamily": "Fira Code, Menlo, Monaco, 'Courier New', monospace", | |
"editor.fontLigatures": true, | |
// Taille maximum des lignes et | |
// affichage des espaces | |
"editor.wrappingColumn": 80, | |
"editor.wordWrap": true, | |
"editor.renderWhitespace": "boundary", |
$main:#066a81; | |
$grey:rgb(245, 245, 245); | |
$text-color: #000; | |
$background: rgb(245,245,245); | |
$fontStack: arial, helvetica, sans-serif; | |
$codeFontStack: Consolas, Inconsolata, Courier, monospace; | |
/* | |
* NOTE: |
javascript:(function(){var ampCol = document.querySelectorAll('link[rel="amphtml"');if(ampCol){location.href=ampCol[0].href;}})(); |