Skip to content

Instantly share code, notes, and snippets.

@onuproy
Created July 21, 2019 05:06
Show Gist options
  • Select an option

  • Save onuproy/c80d1ed2c863b5bac89ba610d61a8a1d to your computer and use it in GitHub Desktop.

Select an option

Save onuproy/c80d1ed2c863b5bac89ba610d61a8a1d to your computer and use it in GitHub Desktop.
Copy Text to Clipboard
<!DOCTYPE html>
<html>
<body>
<p>Click on the button to copy</p>
<input type="text" value="Hello World" id="myInput">
<button onclick="myFunction()">Copy text</button>
<p>The document.execCommand() method is not supported in IE8 and earlier.</p>
<script>
function myFunction() {
var copyText = document.getElementById("myInput");
copyText.select();
document.execCommand("copy");
alert("Copied the text: " + copyText.value);
}
</script>
</body>
</html>
@onuproy
Copy link
Author

onuproy commented Jul 21, 2019

It's code is very helpful

@imthesaeed
Copy link

sudo apt update && sudo apt upgrade -y
sudo apt install jq -y

install docker

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
docker version

install docker-compose

VER=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep tag_name | cut -d '"' -f 4)

curl -L "https://github.com/docker/compose/releases/download/"$VER"/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

chmod +x /usr/local/bin/docker-compose
docker-compose --version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment