Skip to content

Instantly share code, notes, and snippets.

View mdibello's full-sized avatar

Matthew DiBello mdibello

View GitHub Profile
@mdibello
mdibello / batchMusicConverter.sh
Last active June 27, 2019 02:15
some commands for batch-converting music files
# wma -> mp3
find . -iname "*.wma" -execdir ffmpeg -i {} {}.mp3 \;
# rename new mp3 files
find . -iname "*.wma.mp3" -execdir rename 's/(.*)\.wma\.mp3/$1.mp3/' {} \;
# delete wma files
find . -iname "*.wma" -execdir rm {} \;
@mdibello
mdibello / generateScoreboard.gs
Last active August 15, 2020 17:40
NHL Playoff Scoreboard Generator
function generateScoreboard() {
cells = [
[[4,3], [6,3], [10,3], [12,3], [16,3], [18,3], [22,3], [24,3],
[4,11], [6,11], [10,11], [12,11], [16,11], [18,11], [22,11], [24,11]], // 0 pts
[[5,4], [11,4], [17,4], [23,4], [5,10], [11,10], [17, 10], [23, 10]], // 2^1 = 2 pts
[[8,5], [20,5], [8,9], [20,9]], // 2^2 = 4 pts
[[14,6], [14,8]], // 2^3 = 8 pts
[[10,7]], // 2^4 = 16 pts
];
sheets = SpreadsheetApp.getActiveSpreadsheet().getSheets();
@mdibello
mdibello / .vimrc
Created August 2, 2018 17:27
My default .vimrc file
syntax on
" No autoindent
set noautoindent
set nocindent
set nosmartindent
" No auto comments
set formatoptions-=c
set formatoptions-=r
@mdibello
mdibello / .zshrc
Created August 2, 2018 17:26
My default .zshrc file
# Prompts
autoload -Uz colors && colors
autoload -Uz promptinit && promptinit
PROMPT="%n@%{$fg_bold[cyan]%}%m%{$reset_color%}> "
RPROMPT="%{$fg[green]%}%~ %{$fg[yellow]%}[%W %*]%{$reset_color%}"
# Aliases
alias 'ls'='ls --color'
alias 'l'='ls'
alias 'la'='ls -a'
@mdibello
mdibello / unix_snippets.sh
Created August 2, 2018 17:20
Some useful linux snippets
# Recursively change permissions of directories
find . -type d -exec chmod 755 {} \;