Skip to content

Instantly share code, notes, and snippets.

View BohdanTkachenko's full-sized avatar

Bohdan Tkachenko BohdanTkachenko

  • Google
  • New York, NY
View GitHub Profile
@BohdanTkachenko
BohdanTkachenko / install-nvidia-docker.sh
Last active January 2, 2020 01:48
Install NVIDIA drivers and nvidia-docker on Ubuntu (if Docker is installed already)
add-apt-repository -y ppa:graphics-drivers/ppa
apt-get update -y
apt-get install -y build-essential
wget http://us.download.nvidia.com/XFree86/Linux-x86_64/381.09/NVIDIA-Linux-x86_64-381.09.run
sh NVIDIA-Linux-x86_64-381.09.run -q -a --ui=none
rm NVIDIA-Linux-x86_64-381.09.run
apt-get install -y nvidia-384 nvidia-modprobe
nvidia-smi
wget https://github.com/NVIDIA/nvidia-docker/releases/download/v1.0.1/nvidia-docker_1.0.1-1_amd64.deb
dpkg -i nvidia-docker_1.0.1-1_amd64.deb
@BohdanTkachenko
BohdanTkachenko / keybase.md
Created January 4, 2016 23:29
keybase.md

Keybase proof

I hereby claim:

  • I am bohdantkachenko on github.
  • I am bohdantkachenko (https://keybase.io/bohdantkachenko) on keybase.
  • I have a public key ASCQQi2Uso1IMsOdCiRBxTg5-eD-KlaKGwQsqRUJ_uW9oQo

To claim this, I am signing this object:

@BohdanTkachenko
BohdanTkachenko / gist:1d4e0c12186f8a33b1e1
Created June 12, 2015 20:15
Fluid - Google Inbox - Badge
function getMessagesCount() {
var re = /\((\d+)\)/;
var count = 0;
Array.prototype.slice.call(document.querySelectorAll('.scroll-list-item.top-level-item')).forEach(function (el) {
if (el.attributes.class.value.split(' ').indexOf('scroll-list-item-cluster') >= 0 && re.test(el.innerText)) {
count += parseInt(/\((\d+)\)/.exec(el.innerText)[1], 10);
} else {
count++;
}
@BohdanTkachenko
BohdanTkachenko / archivate.sh
Created September 5, 2014 12:32
This tools allows you to easily put subdirectories of some directory to 7z archives. It also tests each archive and creates md5 and sha1 sum files.
#!/bin/bash
if [ $# -ne 1 ]; then
echo "Usage: $0 <directory name>"
echo ""
echo "This tools allows you to easily put subdirectories of some directory to 7z archives."
echo "It also tests each archive and creates md5 and sha1 sum files."
exit 1
fi