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
function properize($string) { | |
return $string.'\''.($string[strlen($string) - 1] != 's' ? 's' : ''); | |
} | |
echo 'Properize: '.properize("Chris"); //returns Chris' | |
echo 'Properize: '.properize("David"); //returns David's | |
// Source: https://davidwalsh.name/php-possessive-punctuation |
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 | |
tail -f /usr/local/vesta/log/backup.log | |
exit 0 |
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 | |
rm /usr/local/vesta/data/queue/backup.pipe | |
touch /usr/local/vesta/data/queue/backup.pipe | |
chmod 750 /usr/local/vesta/data/queue/backup.pipe | |
echo "Current backup in progress has been stopped. You can now create a new backup." | |
exit 0 |
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 | |
#----------------------------------------------------------# | |
# settings # | |
#----------------------------------------------------------# | |
#text colors | |
redtext() { echo "$(tput setaf 1)$*$(tput setaf 9)"; } | |
greentext() { echo "$(tput setaf 2)$*$(tput setaf 9)"; } | |
yellowtext() { echo "$(tput setaf 3)$*$(tput setaf 9)"; } |
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 | |
if [ $# -lt 1 ]; then | |
echo usage: create_wp domain [email] | |
exit 1 | |
fi | |
domain=$1 | |
PATH=$PATH:/usr/local/vesta/bin |