Skip to content

Instantly share code, notes, and snippets.

View anupkrbid's full-sized avatar
🏠
Working from home

Anup Kumar Bid anupkrbid

🏠
Working from home
View GitHub Profile
@anupkrbid
anupkrbid / setup_lamp_stack_for_ubuntu.16.04
Last active September 9, 2017 09:40
Bash Script to setup LAMP Stack on Ubuntu 16.04 along with composer
#!/bin/bash
printf "\033[1;31m/** Updating Packages ... */ \033[0m\n"
sudo apt-get update
printf "\033[1;31m/** Installing Apache2 as Web Server ... */\033[0m\n"
sudo apt-get install -y apache2
printf "\033[1;31m/** Restarting Apache2 Web Server ... */\033[0m\n"
sudo systemctl restart apache2
# To exetact .tar.xz file extention fromm terminal
tar Jxvf file_name.tar.xz
# To get the get node runiing after downloading and extracting
sudo cp -r node/{bin,include,lib,share} /usr/tar Jxvf file_name.tar.xz
sudo cp -r node/{bin,include,lib,share} /usr/
# To download latest directly on server refer to the link below
# https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-an-ubuntu-14-04-server
sudo ln -sf /usr/share/phpmyadmin/ /var/www/html/public/
https://askubuntu.com/questions/55280/phpmyadmin-is-not-working-after-i-installed-it
https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers
https://confluence.jetbrains.com/display/IDEADEV/Inotify+Watches+Limit
If you are not interested in the technical details and only want to get Listen to work:
- If you are running Debian, RedHat, or another similar Linux distribution, run the following in a terminal:
```bash
@anupkrbid
anupkrbid / serving_webpages_other_than_html_folder_for_apache2.md
Last active July 24, 2018 05:56
serving webpages other than html folder for apache2

If your folder is in "/home//Projects/" then run the below command add add the given lines in "/etc/apache2/apache2.conf"

sudo nano /etc/apache2/apache2.conf
<Directory /home/*/Projects/>
        Options Indexes FollowSymLinks
 AllowOverride None
sudo apt-get install -y php7.1 php7.1-fpm php7.1-cli php7.1-common php7.1-mbstring php7.1-gd php7.1-intl php7.1-xml php7.1-mysql php7.1-mcrypt php7.1-zip
@anupkrbid
anupkrbid / gist:9cf3d85e576c586fe384c8c20758c1ba
Created December 21, 2017 22:43
install_jdk_in_ubuntu_16.04
#!/bin/bash
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
#sudo apt-get install oracle-java9-installer
# For more config related info
# https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-get-on-ubuntu-16-04
@anupkrbid
anupkrbid / install_postman_native_app_on_ubuntu_16.04.bash
Last active July 24, 2018 05:50
Installing Postman Native App on ubuntu 16.04.
#!/bin/bash
wget https://dl.pstmn.io/download/latest/linux64 -O postman.tar.gz
sudo tar -xzf postman.tar.gz -C /opt
rm postman.tar.gz
sudo ln -s /opt/Postman/Postman /usr/bin/postman
@anupkrbid
anupkrbid / gist:36e27834fff1b6ed20e7194a2477696b
Created December 21, 2017 22:44
install_dynamodb_locally
#!/bin/bash
wget https://s3.ap-south-1.amazonaws.com/dynamodb-local-mumbai/dynamodb_local_latest.tar.gz
tar -xvzf dynamodb_local_latest.tar.gz -C ./LocalDynamoDB/
rm dynamodb_local_latest.tar.gz
cd LocalDynamoDB
#java -Djava.library.path=./DynamoDBLocal_lib/ -jar DynamoDBLocal.jar
cat dynamo > java -Djava.library.path=./DynamoDBLocal_lib/ -jar DynamoDBLocal.jar
https://askubuntu.com/questions/750498/mysql-5-5-update-to-mysql-5-7