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
if [ $1 ]; then FILENAME=$1; else exit; fi | |
BASENAME=$(basename -- $FILENAME) | |
NAME=${BASENAME%.*} | |
convert $FILENAME -auto-orient +profile "*" -write \ | |
"mpr:source" -resize "1080x1080^" -gravity center -crop "1080x1080+0+0" +repage -write "$NAME-1080.jpg" +delete \ | |
"mpr:source" -resize "720x720^" -gravity center -crop "720x720+0+0" +repage -write "$NAME-720.jpg" +delete \ | |
"mpr:source" -resize "540x540^" -gravity center -crop "540x540+0+0" +repage -write "$NAME-540.jpg" +delete \ | |
"mpr:source" -resize "360x360^" -gravity center -crop "360x360+0+0" +repage -write "$NAME-360.jpg" +delete \ |
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 | |
for DEVICE in $(adb devices | grep device$ | awk '{print $1}'); | |
do | |
for APP in $(find . -maxdepth 3 -type f | grep build\.gradle | xargs cat | grep applicationId | awk '{print $2}'); | |
do | |
RESULT=$(echo $APP | xargs -I _ adb -s $DEVICE uninstall _ 2>/dev/null); | |
if [ "$RESULT" == "Success" ]; then | |
echo "Uninstalled $APP from $DEVICE" | |
fi | |
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
public interface TextWatcherAdapter extends TextWatcher { | |
enum Action { | |
beforeTextChanged, | |
onTextChanged, | |
afterTextChanged | |
} | |
default void beforeTextChanged(CharSequence s, int start, int count, int after) { | |
this.action(Action.beforeTextChanged, s, start, count, after); | |
} |
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 | |
if ! [ "$1" ]; | |
then | |
echo "where file" | |
exit | |
fi | |
filename="${1%.*}" | |
extension="${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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<style type="text/css"> | |
html { | |
height: 100%; | |
display: flex; | |
align-items: center; |
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
if [ -s /etc/hosts.bak ]; then | |
echo '[ Restoring your original hosts file ]' | |
sudo mv /etc/hosts.bak /etc/hosts | |
echo '[ Done! ]' | |
else | |
echo '[ There is nothing to do... ]' | |
fi |
OlderNewer