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/sh | |
| grep 'host ' ~/.ssh/config | sed 's/host /ssh /g' |
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 | |
| for f in $1/* | |
| do | |
| if [ -f "$f" ] | |
| then | |
| base=$(basename "$f") | |
| filename="${base%.*}" | |
| dir=$(dirname "$f") | |
| mime=$(file --mime-type -b "$f") | |
| mimedir=${mime/\//-} |
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 | |
| base=$(basename $2) | |
| filename="${base%.*}" | |
| dir=$(dirname $2) | |
| if ! [ -d "$dir/$1" ] | |
| then | |
| mkdir $dir/$1 | |
| fi | |
| convert $2 -resize $1\> -size $1 xc:transparent +swap -gravity center -composite $dir/$1/$filename.png |
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 | |
| for f in $1/* | |
| do | |
| if [ -f "$f" ] | |
| then | |
| cmd=${2/__file__/$f} | |
| $cmd | |
| fi | |
| done |
NewerOlder