Skip to content

Instantly share code, notes, and snippets.

View wittawatj's full-sized avatar

Wittawat Jitkrittum wittawatj

View GitHub Profile
@Tarrasch
Tarrasch / keymap.xkb
Last active July 27, 2021 22:25
Swedish colemak (Svensk colemak)
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compatibility {
include "complete"
};
xkb_symbols {
include "pc+us(colemak)+inet(evdev)"
key <RALT> {
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@Spoygg
Spoygg / gist:3122226
Created July 16, 2012 11:29
Keyboard switches for XKB setxkbmap
altwin:menu = +altwin(menu)
altwin:meta_alt = +altwin(meta_alt)
altwin:ctrl_win = +altwin(ctrl_win)
altwin:meta_win = +altwin(meta_win)
altwin:left_meta_win = +altwin(left_meta_win)
altwin:super_win = +altwin(super_win)
altwin:hyper_win = +altwin(hyper_win)
altwin:alt_super_win = +altwin(alt_super_win)
altwin:swap_lalt_lwin = +altwin(swap_lalt_lwin)
grp:switch = +group(switch)
@fd0
fd0 / gist:6951577
Created October 12, 2013 15:54
i3 multi monitor config snippet
# assign workspaces to screens
workspace 1 output DVI-I-1
workspace 2 output DVI-I-1
workspace 3 output DVI-I-1
workspace 4 output DVI-I-1
workspace 5 output DVI-I-1
workspace 6 output HDMI-0
workspace 7 output HDMI-0
workspace 8 output HDMI-0
workspace 9 output HDMI-0
@DominicBreuker
DominicBreuker / gd_simple.py
Created June 16, 2016 16:30
Simple example of gradient descent in tensorflow
import tensorflow as tf
x = tf.Variable(2, name='x', dtype=tf.float32)
log_x = tf.log(x)
log_x_squared = tf.square(log_x)
optimizer = tf.train.GradientDescentOptimizer(0.5)
train = optimizer.minimize(log_x_squared)
init = tf.initialize_all_variables()
@Yatoom
Yatoom / setup.md
Last active June 16, 2024 01:14
Thinkfan configuration

Thinkfan setup

Note: I configured this thinkfan setup for my old Thinkpad w520 on Ubuntu 17.10.

1. Install necessary programs

Install lm-sensors and thinkfan.

sudo apt-get install lm-sensors thinkfan
@torfjelde
torfjelde / FSSD_gof_pushforward.jl
Last active September 17, 2019 11:04
Example of applying the FSSD goodness-of-fit test to a ChiSq distribution using Log as as push-forward.
julia> using Bijectors
julia> using KernelGoodnessOfFit
julia> using Random; Random.seed!(123);
julia> using ForwardDiff
julia> function Distributions.gradlogpdf(d::ContinuousUnivariateDistribution, x::Real)
ForwardDiff.derivative(z -> logpdf(d, z), x)