Skip to content

Instantly share code, notes, and snippets.

View merajsiddiqui's full-sized avatar
🎯
Focusing

MERAJ AHMAD SIDDIQUI merajsiddiqui

🎯
Focusing
View GitHub Profile
@merajsiddiqui
merajsiddiqui / linux.txt
Last active October 3, 2015 08:23
General Knowledge for linux myself
Installl sublime from Terminal
sudo add-apt-repository ppa:webupd8team/sublime-text-2
sudo apt-get update
sudo apt-get install sublime-text
Installing git
sudo apt-get install git
Configuring git to use
git config --global user.email "merajsiddiqui@outlook.com"
git config --global user.name "Meraj Ahmad Siddiqui"
@merajsiddiqui
merajsiddiqui / Linux_Mysql.txt
Created October 3, 2015 08:42
Operating and working with mySql from terminal
Installing Mysql Srver
sudo apt-get install mysql
login Mysql
mysql -u username -p
Create a Database
create Database db_name;
Use Database
use db_name;
@merajsiddiqui
merajsiddiqui / install_tar.txt
Last active February 8, 2016 18:39
Downloading tar file and installing from tar files using terminal
Extracting diffrent tar files
tar xzf file.tar.gz
tar xjf file.tar.bz2
tar xvf file.tar -C newfile
After that just to make sure see the folder name by
ls -la
then install by
sudo apt-get install extractedfilename
@merajsiddiqui
merajsiddiqui / code
Last active March 15, 2018 11:28 — forked from Hemant-Mann/code.md
Wget Website Downloader
wget --recursive --no-clobber --page-requisites --html-extension --convert-links --restrict-file-name=windows --domains {domain-name} --no-parent http://domain-name/
in case the above code gives 403 error try this
wget --limit-rate=500k --no-clobber --convert-links --random-wait -r -p -E -e robots=off -U mozilla http://www.xyz.com/abc/
#for Help use this link https://gist.github.com/Hemant-Mann/2d35e4b6fb280b8910cd
#! /bin/bash
#This is the Program to backup your server code by ssh method to bitbucket
#All you need to do is go to bitbucket account create a repository and copy the pucblic ssh key to the repository access
#Copy the repositry name here we will create a backup automatically
mysql -u root -pabcroot -e "SELECT * FROM admin_test.Backup">backup.csv
Download NodeJs Source Code
wget https://nodejs.org/dist/v4.4.2/node-v4.4.2.tar.gz
Extract Tar file
tar -xvf node-v4.4.2.tar.gz
Move to Extracted Folder to install
cd node-v4.4.2/
Addons Before Installation needed
make
sudo apt-get install make
connect to terminal
echo "hostname" > /etc/hostname
hostname -F /etc/hostname
nano /etc/hosts
ip hostname
--set ip there
timezone
dpkg-reconfigure tzdata
sudo su
#uninstalling previous data..
apt-get remove apache2 apache2-mpm-prefork apache2-utils apache2.2-common libapache2-mod-php5 libapr1 libaprutil1 libdbd-mysql-perl libdbi-perl libnet-daemon-perl libplrpc-perl libpq5 mysql-client-5.5 mysql-common mysql-server mysql-server-5.5 php5-common php5-mysql
apt-get purge mysql-client-core-5.5 mysql-server-core-5.5
#installing all modules
apt-get update && apt-get upgrade
@merajsiddiqui
merajsiddiqui / Databse Setup and Query Guide
Last active March 25, 2017 02:27
MongoDB installationon Linux and using with PHP
To Enter into mongo shell type in terminal
mongo
To create a new database just type
use Database_name
To see current database
db
To list all databses
@merajsiddiqui
merajsiddiqui / Php-Developer-Enviornment-Setup.txt
Created February 27, 2017 09:47
Setting up Enviornment For PHP Developer on Linux
#Installing Sublime text
sudo add-apt-repository -y ppa:webupd8team/sublime-text-3
sudo apt-get update
sudo apt-get install sublime-text
#Installing git
sudo apt-get install git