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
//package | |
https://laravelcollective.com/docs/5.1/ssh | |
/* | |
Git Pull Automation | |
*/ | |
Route::get('git/pull', function () { | |
//declare domain and git repository name | |
$domain = "etender.iitds.win"; |
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
mysql -u root -pmy_password -e "create database dbName;" |
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
use Symfony\Component\Process\Process; | |
Route::get('test',function(){ | |
$process = new Process('sudo apt-get update'); | |
$process->run(); | |
// executes after the command finishes | |
if (!$process->isSuccessful()) { | |
throw new ProcessFailedException($process); | |
} |
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
mysql -u amazighw -p amazighw_ama < full.sql |
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 | |
exec('mysqldump --user=root --password=1234 --host=localhost databasename > databasename.sql'); | |
?> |
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
Find the file called: php.ini on your server and follow below steps | |
With apache2 and php5 installed you need to make three changes in the php.ini file. First open the file for editing, e.g.: | |
sudo gedit /etc/php5/apache2/php.ini | |
Next, search for the post_max_size entry, and enter a larger number than the size of your database (15M in this case), for example: | |
post_max_size = 25M | |
Next edit the entry for memory_limit and give it a larger value than the one given to post_max_size. |
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
wget --mirror -p --convert-links -P ./LOCAL-DIR WEBSITE-URL |
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
sudo apt-get install nodejs | |
sudo apt-get install npm | |
sudo ln -s /usr/bin/nodejs /usr/bin/node | |
sudo npm install -g express |
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 | |
sudo apt-get update | |
bash <(wget -qO- http://mywebsite.com/myscript.txt) |
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 | |
sudo add-apt-repository ppa:webupd8team/sublime-text-2 | |
sudo apt-get update | |
sudo apt-get install sublime-text |