This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for f in *.m4a | |
set name (string trim --right --chars=.m4a $f) | |
echo $name | |
ffmpeg -i $f -acodec libmp3lame -b:a 320k $name.mp3 | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
youtube-dl -f bestaudio -o 'The_Sounds_of_the_Monterey_Bay/%(playlist_index)s - %(title)s.%(ext)s' 'https://www.youtube.com/watch?v=oBik31cwRbY&list=PLUSRfoOcUe4aw6JiTXbwUET_wdQ1bnyoo' | |
## Download playlist in separate folder, audio only | |
youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best' -o '%(playlist_index)s-%(title)s.%(ext)s' 'https://www.youtube.com/playlist?list=PL4BBB74C7D2A1049C' | |
## Download playlist with best quality |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in (find . -type f -iname "*.webm") | |
set int (string trim -l -c=./ $i) | |
set name (string trim -r -c=.webm $int) | |
echo $name | |
ffmpeg -i $i -vn -acodec libmp3lame -q:a 2 $name.mp3 | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -maxdepth 1 -type f -exec mv '{}' ./wk1/ \; | |
// it seems like no -t available in fish Shell and Mac... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for remote in (git branch -r | grep -v HEAD) | |
// remove the origin/ | |
set bran (string replace -r 'origin\/' '' $remote) | |
// remove the left trailing white spaces | |
set br (string trim -l $bran) | |
set r (string trim -l $remote) | |
// create branch local to track the origin/branch | |
git branch --track $br $r | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ref: http://stackoverflow.com/questions/3331353/transitions-on-the-display-property */ | |
div > ul { | |
visibility: hidden; | |
opacity: 0; | |
transition: visibility 0s, opacity 0.5s linear; | |
} | |
div:hover > ul { | |
visibility: visible; | |
opacity: 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
convert -density 300 bujo_MondayStart_Duplex_marriedtotheearth.pdf bullet_journal.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mvim -p $(git log --pretty="" --name-only -1 | tr -s '\n' ' ') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
results = [] | |
file_names = `find . -print | grep '.*referral.*'`.split("\n");nil | |
file_names.each do |name| | |
output = `git log --follow --pretty=format:'{"commit": "%H","author": "%aN <%aE>","date": "%ad","message": "%f"},' -- #{name}` | |
results.concat(JSON.parse('[' + output.gsub("\n", '')[0..-2] + ']')) | |
end | |
mapping = {} | |
results.each do |res| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -type d -not -empty -exec echo mv \{\}/README.md \{\}.md \; | |
# This is to preview the command first with echo | |
find . -type d -empty -print # to show the folder to be deleted | |
find . -type d -empty -delete # to delete the empty folder | |
# https://unix.stackexchange.com/questions/46322/how-can-i-recursively-delete-empty-directories-in-my-home-directory | |
mv myfolder/* . | |
# move the folder content one level up |
OlderNewer