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/bash | |
# search and optionally purge cached content from nginx by URL or parts of the URL | |
# you can set the default cache dir | |
DEFAULT_NGINX_CACHE_DIR=/dev/shm/nginx | |
function usage { | |
echo "nginx cache - search and purge content from nginx" |
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/bash | |
FILE=$1 | |
if [ -z $FILE ]; then | |
FILE=screen.png | |
fi | |
adb shell screencap -p | sed 's/\r$//' > ${FILE} |
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/bash | |
losetup -f | |
while getopts “u” OPTION | |
do | |
case $OPTION in | |
u) | |
UMOUNT=1 | |
;; | |
esac |
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
echo "PUT YOUR MAIL BODY HERE" | mailx -s "SUBJECT" -S smtp=smtp://yoursmtpserver.com -S smtp-auth=login -S smtp-auth-user=YOUR_USERNAME -S smtp-auth-password=YOUR_PASSWORD -S from="Sender Name <[email protected]>" [email protected] |
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
SELECT DBName,CONCAT(LPAD(FORMAT(SDSize/POWER(1024,pw),3),17,' '),' ', | |
SUBSTR(' KMGTP',pw+1,1),'B') "DataSize", | |
CONCAT(LPAD(FORMAT(SXSize/POWER(1024,pw),3),17,' '),' ', | |
SUBSTR(' KMGTP',pw+1,1),'B') "IndexSize", | |
CONCAT(LPAD(FORMAT(STSize/POWER(1024,pw),3),17,' '),' ', | |
SUBSTR(' KMGTP',pw+1,1),'B') "Total Size" | |
FROM (SELECT IFNULL(DB,'All Databases') DBName,SUM(DSize) SDSize, | |
SUM(XSize) SXSize,SUM(TSize) STSize | |
FROM (SELECT table_schema DB,data_length DSize,index_length XSize, | |
data_length+index_length TSize FROM information_schema.tables WHERE |