This file contains hidden or 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/env bash | |
| echo '#!/bin/env bash | |
| OPTS="" | |
| if [[ "$1" == /tmp/* ]]; then | |
| OPTS="-w" | |
| fi | |
| "$(which code)" ${OPTS:-} -a "$@" | |
| ' > "$HOME/.local/bin/code-wait.sh" |
This file contains hidden or 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
| #! /usr/bin/env bash | |
| oldusername="$1" | |
| newusername="$2" | |
| find . | grep -e .git$ | while read -r line; do | |
| thedir="$(echo "$line" | sed -e 's|.git$||g')" | |
| cd "$thedir" | |
| oldorigin="$(git config --get remote.origin.url)" | |
| if [[ "$oldorigin" == *"$oldusername"* ]]; then |
This file contains hidden or 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/bash | |
| ICLOUD_UN="example@apple.com" | |
| ICLOUD_PW="$(sudo script_to_retrive_pass)" | |
| icloudpd ~/Pictures/ --folder-structure={:%m.%y} --username "$ICLOUD_UN" --password "ICLOUD_PW" |
This file contains hidden or 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/bash | |
| sqlite3 ~/.mozilla/firefox/$(ls ~/.mozilla/firefox/ | grep .default)/places.sqlite "select url from moz_places order by last_visit_date desc limit ${1-15}" |
This file contains hidden or 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/bash | |
| NAME="YOUR_DEVICE_NAME" | |
| ADDRESS="YOUR_DEVICE_ADDRESS" | |
| STR="$(echo "quit" | bluetoothctl | grep -oP '.*(?=#)' | tail -1)" | |
| if [[ $STR == *"$NAME"* ]]; then | |
| echo "disconnect $ADDRESS" | bluetoothctl | tail -3 | head -1 | |
| else |
This file contains hidden or 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/bash | |
| OUT1=$(echo "$1" | sed -e 's|.*/||' | sed -e 's|\..*||') | |
| OUT2=$(echo "$2" | sed -e 's|.*/||' | sed -e 's|\..*||') | |
| if [ ! -d '/tmp/word-diff/' ]; then | |
| mkdir '/tmp/word-diff/'; | |
| fi | |
| FILE1="/tmp/word-diff/$OUT1.md" |
This file contains hidden or 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/bash | |
| ffmpeg -loop 1 -i $1 -i $2 -c:v libx264 -tune stillimage -c:a aac -b:a 192k -pix_fmt yuv420p -speed 10 -shortest $3 |
This file contains hidden or 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/bash | |
| FILENAME=$(sed -e 's:.*/::' <<< "$1") | |
| OUT=$(sed -e "s/\..*/\.gif/" <<< "$FILENAME") | |
| FRAMERATE=${5-10} | |
| PLAYRATE=$((45/$FRAMERATE)) |
This file contains hidden or 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/bash | |
| : ' | |
| usage: | |
| meld.sh [input file] [min] [max] [outlength] [fx] [mute] [output] | |
| setup: | |
| place meld.sh in path and install the melt command line tool from MLT. it may already be installed on your system if you use openshot or kdenlive or other programs which are powered by MLT, otherwise: | |
| sudo install melt |
This file contains hidden or 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/bash | |
| mpv "`find /path/to/music/library/ -maxdepth 2 -mindepth 2 -type d -printf '%T@ %p\n' | sort -n | tail -$1 | cut -f2- -d" " | head -1`" --no-video |
NewerOlder