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 | |
#by Nate Flink | |
mysqldump -u $2 -p$3 --extended-insert=false -h $4 $1 > $5 | |
MINSIZE=3 | |
ACTSIZE=$(du -k $5 | cut -f 1) | |
if [ $ACTSIZE -le $MINSIZE ]; then | |
echo "Error: the database backup is ${ACTSIZE} kilobytes, needs to be at least ${MINSIZE}" | |
exit 1 |
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 | |
#By Nate Flink | |
# Adds a mysql user, and creates a database with the same name as the user and echos the generated password | |
if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then | |
echo "Usage: ./$0 [mysql db username] [mysql user password] [new identifier] [optional password]" | |
exit 1 | |
fi |
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
echo -e "/*\nTheme Name: Custom Theme\nTheme URI: http://codex.wordpress.org/Theme_Development\nDescription: This is a custom theme\nAuthor: Nate Flink\nAuthor URI: http://nateflink.com/\nVersion: 1.0\nTags: custom, theme, awesome\n\nLicense:\nLicense URI:\n\nGeneral comments (optional).\n\nThe main stylesheet. This must be included with your Theme, and it must contain the information header for your Theme.*/" > style.css ;\ | |
echo -e "/*The rtl stylesheet. This will be included automatically if the website's text direction is right-to-left. This can be generated using the the RTLer plugin.*/" > rtl.css ;\ | |
echo -e " <?php /*The main template. If your Theme provides its own templates, index.php must be present. */ ?>" > index.php ;\ | |
echo -e " <?php /*The comments template. */ ?>" > comments.php ;\ | |
echo -e " <?php /*The front page template, it is only used if you use a static front page. */ ?>" > front-page.php ;\ | |
echo -e " <?php /*The home page template, which is the front page by default. If you use a static fr |
NewerOlder