Skip to content

Instantly share code, notes, and snippets.

View Faizanq's full-sized avatar

Faizan Qureshi Faizanq

View GitHub Profile
Step 1 - install
sudo docker pull docker.elastic.co/elasticsearch/elasticsearch:7.1.0
Step 2 - Run
docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.1.0
Step-1 Donwnload
wget https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/deb/elasticsearch/2.3.4/elasticsearch-2.3.4.deb
Step-2 Install
sudo dpkg -i elasticsearch-2.3.4.deb
Step-3 Run
sudo update-rc.d elasticsearch default 95 10
sudo /etc/init.d/elasticsearch start
puttygen command to convert your .pem file to a .ppk file:
sudo puttygen pemKey.pem -o ppkKey.ppk -O private
puttygen command to convert a .ppk file into a .pem file:
sudo puttygen ppkkey.ppk -O private-openssh -o pemkey.pem
sudo apt-get update
sudo apt-get install apache2
sudo a2enmod headers proxy_http xml2enc proxy ssl proxy_wstunnel rewrite
Note: rewrite // this mode is to enable htaccess
for .htaccess to work enabled mode rewrite
sudo nano /etc/apache2/apache2.conf
https://askubuntu.com/questions/634082/how-to-install-android-studio-on-ubuntu
https://linuxscriptshub.com/uninstall-completely-remove-mysql-ubuntu-16-04/
@Faizanq
Faizanq / Keep selected tab on page refresh
Created June 25, 2019 05:49
Keep selected tab on page refresh
$(document).ready(function() {
if (location.hash) {
$("a[href='" + location.hash + "']").tab("show");
}
$(document.body).on("click", "a[data-toggle='tab']", function(event) {
location.hash = this.getAttribute("href");
});
});
$(window).on("popstate", function() {
var anchor = location.hash || $("a[data-toggle='tab']").first().attr("href");
tar -xvzf LibreOffice_6.2.5_Linux_x86_deb.tar.gz
cd LibreOffice_6.2.5_Linux_x86_deb/DEBS/
dpkg -i *.deb
@Faizanq
Faizanq / bash-script-git.sh
Created July 11, 2019 09:20 — forked from salcode/bash-script-git.sh
Notes for bash scripting git commands
# Current branch - Determine current git branch, store in $currentbranch, and exit if not on a branch
if ! currentbranch=$(git symbolic-ref --short -q HEAD)
then
echo We are not currently on a branch.
exit 1
fi
# Uncommited Changes - Exit script if there uncommited changes
if ! git diff-index --quiet HEAD --; then
echo "There are uncommited changes on this repository."
lsof -Pi | grep LISTEN