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 'backing up ...' | |
| # sql dump all | |
| mysqldump -v -u dev -p --all-databases > mysql-`date '+%d-%m-%Y'`.sql | |
| # project files | |
| tar jcvf project-`date '+%d-%m-%Y'`.tar.bz2 /project/ | |
| # put all together | |
| tar jcvf backup-`date '+%d-%m-%Y'`.tar.bz2 project-* mysql-* |
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 'go install ...' | |
| wget https://storage.googleapis.com/golang/go1.5.1.linux-amd64.tar.gz; | |
| tar xvf go1.5.1.linux-amd64.tar.gz; | |
| sudo mv go /usr/local | |
| export PATH=$PATH:/usr/local/go/bin | |
| sudo mkdir /project/go | |
| export GOPATH=/project/go | |
| echo 'done!' |
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 | |
| echo 'updating system ...' | |
| sudo apt-get -y update | |
| sudo apt-get -y upgrade | |
| sudo apt-get -y dist-upgrade | |
| sudo apt-get -y install curl | |
| curl -sL https://deb.nodesource.com/setup | sudo bash - | |
| curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=bin --filename=composer |
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
| <?php //--> | |
| /* | |
| CREATE TABLE IF NOT EXISTS `channel` ( | |
| `id` int(11) NOT NULL AUTO_INCREMENT, | |
| `user_id` int(11) NOT NULL, | |
| `name` text NOT NULL, | |
| `data` longtext NOT NULL, | |
| `created_at` timestamp NULL DEFAULT NULL, | |
| `updated_at` timestamp NULL DEFAULT NULL, |
NewerOlder