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 `ls *.mkv`; do [[ $i =~ [sS]([0-9]{2})[eE]([0-9]{2}) ]] && mv *${BASH_REMATCH[1]}x${BASH_REMATCH[2]}*.srt ${i%????}.srt 2> /dev/null; done |
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 . -print | grep -i '.*[.]xml' |
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 f -name '*.*' | sed 's|.*\.||' | sort -u |
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
# execute on the prompt or define it as a shell function | |
for i in `cat .env`; do | |
unset `echo $i | cut -f 1 -d "="` | |
done |
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
# execute on the prompt or define it as a shell function | |
for i in `cat .env`; do | |
export $i | |
done |
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
#!/bin/sh | |
# Move the current working tree into a subfolder. | |
# | |
# This will rewite all branches and tags, so this should not | |
# be performed on a repo that has been shared with others, because it | |
# will force them to reset their history. | |
# | |
# Use at your own risk. | |
# | |
# Put the script in your path and invoke it this way: |
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
#!/bin/sh | |
# Reset the commit dates to their corresponding author dates, in the current | |
# branch. Usually useful to preserve the original timestamps after a rebase. | |
# | |
# This action is destructive to your repo's history and this should not | |
# be performed on a repo that has been shared with others, because it | |
# will force them to reset their history. | |
# | |
# Use at your own risk. | |
# |
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
#!/bin/sh | |
# Apply messages from provided input file to commits with empty messages | |
# The messages are applied in inverse order (first line in the file applied to older commit with void message) | |
# and only up to the number of commits with empty messages. | |
# | |
# This action is destructive to your repo's history. It's best to do this on a clone, | |
# just in case. Also beware that this should not be performed on a repo that has been | |
# shared with others without forcing them to reset their history. | |
# | |
# Use at your own risk. |
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
#!/bin/sh | |
# Amend the commit message one specific commit and rebase | |
# to apply the changes. Given the SHA hash or a reference | |
# of the commit to amend, it checkouts the commit, amends | |
# it interactively and rebases the repo history in master. | |
# | |
# This action is destructive to your repo's history and this | |
# should not be performed on a repo that has been shared with | |
# others, because it will force them to reset their history. | |
# |