Skip to content

Instantly share code, notes, and snippets.

@ivan-aksamentov
ivan-aksamentov / Install GitKraken on Ubuntu 20.04 (focal).md
Last active February 16, 2023 03:55
Install GitKraken on Ubuntu 20.04 (focal)

Currently GitKraken installation from .deb package is broken on soon-to-be-released Ubuntu 20.04 (codename "focal"):

$ sudo gdebi -nq gitkraken-amd64.deb 
[sudo] password for <username>: 
(Reading database ... 262175 files and directories currently installed.)
Preparing to unpack .../gitkraken-amd64.deb ...
Unpacking gitkraken (6.6.0) over (6.5.4) ...
dpkg: dependency problems prevent configuration of gitkraken:

In /etc/modprobe.d/blacklist.conf remove

blacklist i2c_i801

In grub config /etc/default/grub add

@ivan-aksamentov
ivan-aksamentov / fix_ubuntu_18_04_llvmpipe.sh
Created October 15, 2018 22:31
Fix Ubuntu 18.04 fallback to llvmpipe software rendering when Nvidia driver is installed
sudo rm -rf /usr/share/X11/xorg.conf.d/11-nvidia-prime.conf
sudo rm -rf /usr/lib/xorg/modules/drivers/nvidia_drv.so
@ivan-aksamentov
ivan-aksamentov / binutils-bfd-elflink.patch
Created October 3, 2018 12:36
Patch for binutils 2.31.1 that fixes "invalid version 21 (max 0)" errors https://sourceware.org/ml/binutils/2018-08/msg00227.html
#!/bin/bash
# Usage:
# grepl [OPTIONS] [GREP-OPTIONS] PATTERN FILE
help() {
cat <<EOF
Usage: grepl [OPTIONS] [GREP-OPTIONS] PATTERN FILE
Options:
@ivan-aksamentov
ivan-aksamentov / firefox-fix-dark-gtk-form-fields.txt
Created September 22, 2018 21:23
Workaround for "Some form fields are black on Gtk3 dark theme" in Firefox (Linux GTK3)
From: https://bugzilla.mozilla.org/show_bug.cgi?id=1283086#c7
By: Martin Stránský [:stransky]
A partial fix (for Firefox 55 and e10s enabled) is to add new string key
to about:config with "widget.content.gtk-theme-override" name and "Adwaita:light" value.
@ivan-aksamentov
ivan-aksamentov / sparse_softmax_cross_entropy_with_logits_nan_repro.py
Created September 18, 2016 20:27
Snippet to reproduce the chenged behavior of TensorFlow's `sparse_softmax_cross_entropy_with_logits` funcition. See tensorflow issue #4443
from __future__ import print_function, division
import tensorflow as tf
I = 1 # input size
T = 6 # sequence length (num timesteps)
B = 3 # batch size
C = 7 # number of classes
X = [
[[0.0], [1.0], [2.0], [3.0], [0.0], [0.0]],