Skip to content

Instantly share code, notes, and snippets.

Avatar

Erik Gärtner ErikGartner

View GitHub Profile
View gist:3238470fe8a291f131fd2e0b88efc9da
### Keybase proof
I hereby claim:
* I am erikgartner on github.
* I am erikgartner (https://keybase.io/erikgartner) on keybase.
* I have a public key ASAx65x5aiAfExWxAwGGqaiMijfFIibSHDbALxpdqmTIDwo
To claim this, I am signing this object:
@ErikGartner
ErikGartner / tmux.md
Created Oct 10, 2018 — forked from andreyvit/tmux.md
tmux cheatsheet
View tmux.md

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

# remap prefix to Control + a
@ErikGartner
ErikGartner / install-cuda-8.0.sh
Last active Aug 29, 2018
CUDA installation scripts. Note that these script are rough and doesn't check for all eventualities.
View install-cuda-8.0.sh
#! /bin/sh
# Installs CUDA 8.0 (not cuDNN) on Ubuntu 16.04 (or equivalent).
# Remove old stuff
sudo apt remove --purge -y "*cuda*" "*nvidia*" "*cudnn*"
# Download CUDA
wget "https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64-deb" -O "cuda.deb"
wget "https://developer.nvidia.com/compute/cuda/8.0/Prod2/patches/2/cuda-repo-ubuntu1604-8-0-local-cublas-performance-update_8.0.61-1_amd64-deb" -O "cuda-patch.deb"
@ErikGartner
ErikGartner / CUDA guide.md
Last active Feb 22, 2021
A CUDA installations guide
View CUDA guide.md

A Magical Guide to Installing CUDA

This guide tries to make sense of installing NVIDIA CUDA on Ubuntu.

Disclaimer: Installing CUDA is a somewhat tedious and can be a problematic process. This guide worked for me, though if you have an unusual configuration you might need additional preparations to make this work. My machines are mostly blank Ubuntu machines.

For reference NVIDIA's official guides are here for CUDA and cuDNN.

Last updated: 2019-07-27

Versions

@ErikGartner
ErikGartner / filter_genre.py
Created May 23, 2017
Preprocess lyrics for RNN
View filter_genre.py
import csv
import requests
import sys
import json
LASTM_FM_KEY = ''
genre_cache = {}
@ErikGartner
ErikGartner / build_db.py
Created Mar 19, 2017
Whitewolf wikia dumper
View build_db.py
import requests
import json
BASE_URL = 'http://whitewolf.wikia.com/'
def scrape_artifacts(offset=''):
path = 'api/v1/Articles/List'
query = {
'expand': 1,
@ErikGartner
ErikGartner / block.txt
Last active Feb 7, 2017
Gartner Adblock
View block.txt
[Adblock Plus 2.0]
omni.se##article.article--sponsored
View keybase.md

Keybase proof

I hereby claim:

  • I am erikgartner on github.
  • I am erikgartner (https://keybase.io/erikgartner) on keybase.
  • I have a public key ASAdw1HSlw2GJ1BWEZCBmt6wNjAhppKRRVL3ic_9Zj7Vqwo

To claim this, I am signing this object:

@ErikGartner
ErikGartner / tag.sh
Created Dec 23, 2016
Fix audiobook id3 tracknumber from filename
View tag.sh
for name in *.mp3; do
track=$(echo $name | cut -d - -f 1)
max_track=$(echo $name | cut -d - -f 2 | cut -d ' ' -f 1)
echo "$name - $track/$max_track"
id3v2 -T "$track/$max_track" "$name"
done
@ErikGartner
ErikGartner / update_plex.sh
Last active Mar 22, 2016
Script to download and install Plex debian update
View update_plex.sh
update_plex() {
tmp=$(mktemp)'.deb'
url=$1
wget -O "$tmp" "$1"
sudo dpkg -i $tmp
rm -f $tmp
}