Skip to content

Instantly share code, notes, and snippets.

View ratulcse10's full-sized avatar

Abu Shahriar Ratul ratulcse10

View GitHub Profile
@ratulcse10
ratulcse10 / steps.txt
Created September 3, 2016 02:44
How to Git Pull Automatically
//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";
@ratulcse10
ratulcse10 / shell_mysql.sh
Last active May 3, 2016 05:19
create mysql database in one line shell
mysql -u root -pmy_password -e "create database dbName;"
@ratulcse10
ratulcse10 / gist:ee71916d3b2223234fed50e0c3171f33
Created May 1, 2016 06:08
create symfony process in laravel project
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);
}
mysql -u amazighw -p amazighw_ama < full.sql
@ratulcse10
ratulcse10 / gist:ced2205a1352e120273dfd36740108a6
Created April 6, 2016 19:46
how to generate mysql dump using a single php file
<?php
exec('mysqldump --user=root --password=1234 --host=localhost databasename > databasename.sql');
?>
@ratulcse10
ratulcse10 / instruction.txt
Created March 26, 2016 06:58
increase phpmyadmin import limit
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.
@ratulcse10
ratulcse10 / wget.sh
Created March 18, 2016 14:30
wget site crawler
wget --mirror -p --convert-links -P ./LOCAL-DIR WEBSITE-URL
@ratulcse10
ratulcse10 / nodejs.sh
Last active April 12, 2016 09:51
install nodejs in ubuntu
sudo apt-get install nodejs
sudo apt-get install npm
sudo ln -s /usr/bin/nodejs /usr/bin/node
sudo npm install -g express
@ratulcse10
ratulcse10 / update.sh
Last active January 11, 2016 02:41
remote bash testing
#!/bin/bash
sudo apt-get update
bash <(wget -qO- http://mywebsite.com/myscript.txt)
@ratulcse10
ratulcse10 / sublime.txt
Last active January 11, 2016 02:36
How to install Sublime Text 2 on Ubuntu 14.04
#!/bin/bash
sudo add-apt-repository ppa:webupd8team/sublime-text-2
sudo apt-get update
sudo apt-get install sublime-text