Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Arghya Guha GuhaAG

🏠
Working from home
View GitHub Profile
@GuhaAG
GuhaAG / stop
Created Aug 25, 2020
stop process at port
View stop
#!/bin/bash
touch temp.text
lsof -n -i4TCP:$1 | awk '{print $2}' > temp.text
pidToStop=`(sed '2q;d' temp.text)`
> temp.text
if [[ -n $pidToStop ]]
then
kill -9 $pidToStop
echo "!! $1 is stopped !!"
else
@GuhaAG
GuhaAG / docker_setup_wsl.sh
Created Dec 2, 2019 — forked from sgtoj/docker_setup_wsl.sh
Ubuntu for Windows: Setup Docker for WSL
View docker_setup_wsl.sh
# install docker client
curl https://download.docker.com/linux/static/stable/x86_64/docker-18.06.3-ce.tgz > ~/docker.tar.gz
tar xzvf ~/docker.tar.gz
sudo mv ~/docker/docker /usr/local/bin/docker
rm -rf ~/docker
rm -f ~/docker.tar.gz
# install docker-compose client
curl -L https://github.com/docker/compose/releases/download/1.25.0/docker-compose-Linux-x86_64 > ~/docker-compose
chmod +x ~/docker-compose
sudo mv ~/docker-compose /usr/local/bin/docker-compose