Skip to content

Instantly share code, notes, and snippets.


Sigurður Árni Svanbergsson siggiarni

View GitHub Profile
siggiarni /
Created Jan 26, 2020 — forked from protrolium/
using ffmpeg to extract audio from video files


Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:

View cloudSettings

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris semper quam eu mauris molestie, vitae tempus nunc venenatis. Sed ut quam luctus, congue velit sit amet, vulputate sem. Maecenas sagittis tortor ut mattis euismod. Proin ac dolor neque. Praesent nec fringilla nunc, et sagittis dolor. Sed fringilla sed quam ut tristique. Donec aliquet consequat turpis, in pharetra metus rhoncus sed. Integer erat turpis, gravida vitae quam a, mollis commodo lorem. Integer consectetur diam nunc, a porta tellus consequat eget. Ut mattis ex vitae ante aliquet, a pulvinar ligula tincidunt. Vestibulum enim nisi, placerat aliquet placerat vel, condimentum non est.

View homebrew-fix
/usr/bin/find "$(brew --prefix)/Caskroom/"*'/.metadata' -type f -name '*.rb' -print0 | /usr/bin/xargs -0 /usr/bin/sed -i '' '/depends_on macos:/d'
siggiarni /
Last active Nov 18, 2018 — forked from DanHerbert/
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.


This solution fixes the error caused by trying to run npm update npm -g. Once you're finished, you also won't need to use sudo to install npm modules globally.

Before you start, make a note of any globally installed npm packages. These instructions will have you remove all of those packages. After you're finished you'll need to re-install them.

View tmux.conf
# Setting the prefix from C-b to C-a
set -g prefix C-a
# Free the original Ctrl-b prefix keybinding
unbind C-b
#setting the delay between prefix and command
set -s escape-time 1
# Set the base index for windows to 1 instead of 0
View paste_input.applescript
tell application "SystemUIServer"
display dialog "Try pasting now" default answer ""
end tell
View vimrc.vim
syntax on
colorscheme flatland
filetype plugin indent on
" Turn on omni complete
set omnifunc=syntaxcomplete#Complete
set title "Set the document name in the window title.
set showcmd "Show (partial) command in the last line of the screen.
set showmode "If in Insert, Replace or Visual mode put a message on the last line.
View vimrc
execute pathogen#infect()
" Setting up Vundle - the vim plugin bundler
let iCanHazVundle=1
let vundle_readme=expand('~/.vim/bundle/vundle/')
if !filereadable(vundle_readme)
echo "Installing Vundle.."
echo ""
silent !mkdir -p ~/.vim/bundle
silent !git clone ~/.vim/bundle/vundle
let iCanHazVundle=0
View youtube_embed.txt