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
# 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;}})(); |
colorscheme:symfony | |
cs_re:cyan:^\[....-..-.. ..:..:..\] | |
cs_re:blue: .*\.(INFO|NOTICE).* | |
cs_re:red: .*\.(ERROR|CRITICAL).* | |
cs_re:blue: \{[^}]+\} |
Verifying that +borisschapira is my blockchain ID. https://onename.com/borisschapira |