Skip to content

Instantly share code, notes, and snippets.

View ktolutom's full-sized avatar

Kunle Olutomilayo ktolutom

View GitHub Profile
@ktolutom
ktolutom / start_docker_shell.sh
Last active September 20, 2023 02:26
start_docker_shell #docker
#!/bin/bash
if [ "$#" == 0 ]; then
docker run --workdir=/volume -p 8889:8889 -it --rm --net=host -e DISPLAY=$DISPLAY --ipc=host -v $HOME/.Xauthority:$HOME/.Xauthority -v /tmp/.X11-unix:/tmp/.X11-unix -v $PWD:/volume myimage:1.0 /bin/bash
elif [ "$#" == 1 ]; then
docker run --workdir=/volume -p 8889:8889 -it --rm --net=host -e DISPLAY=$DISPLAY --ipc=host -v $HOME/.Xauthority:$HOME/.Xauthority -v /tmp/.X11-unix:/tmp/.X11-unix -v $PWD:/volume myimage:1.0 /bin/bash
else
echo 'Usage: bash start_docker_shell.sh'
exit 1
fi
@ktolutom
ktolutom / setting up ssh for GitHub.sh
Last active September 22, 2023 19:36
ssh for GitHub #git
generate private and public key
$ cd ~/.ssh
$ ssh-keygen -o -t rsa -C "[email protected]"
print the public key
$ ls
$ cat id_rsa.pub
copy the public key to Github > Settings > SSH and GPK keys > Add new SSH