- Use the present tense ("Add feature" not "Added feature")
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit the first line to 72 characters or less
- Reference issues and pull requests liberally after the first line
- When only changing documentation, include
[ci skip]
in the commit title - Consider starting the commit message with an applicable emoji
#!/bin/sh | |
declare -r LINE_NUMBER_PANE_WIDTH=3 | |
declare -r LINE_NUMBER_UPDATE_DELAY=0.1 | |
declare -r COLOR_NUMBERS_RGB="101;112;161" | |
declare -r COLOR_ACTIVE_NUMBER_RGB="255;158;100" | |
open_line_number_split(){ | |
local self_path=$(realpath $0) | |
local pane_id=$(tmux display-message -pF "#{pane_id}") |
# from https://stackoverflow.com/questions/2180270/check-if-current-directory-is-a-git-repository | |
[ -d .git ] || git rev-parse --git-dir > /dev/null 2>&1 |
function git_branch { | |
ref=$(git symbolic-ref HEAD 2> /dev/null) || return; | |
echo "("${ref#refs/heads/}") "; | |
} | |
function git_since_last_commit { | |
now=`date +%s`; | |
last_commit=$(git log --pretty=format:%at -1 2> /dev/null) || return; | |
seconds_since_last_commit=$((now-last_commit)); | |
minutes_since_last_commit=$((seconds_since_last_commit/60)); |
If you work with sensitive (human) data (e.g. anything that contains an identifier of an individual), you occasionally want to share that data. The most straightforward way to do so is to send them by email (and yes - we are all guilty of that!). The problem arises, if the data get into wrong hands. Let's say you send the email accidentally to the wrong person. Or worse, without your knowledge, the email gets into the wrong hands.
The good news is, that there is a secure & handy solution for this. But let's first have a look at some other solutions.
This is a brief guide on how to install Archlinux as a WSL2 distribution and how to set up CUDA afterwards.
As of late, Window's WSL2 offers GPU passthrough from WSL2/Linux to Windows for NVidia graphics cards which allows to run (and develop) CUDA-based applications on the WSL2/Linux-side with almost native performance. Unfortunately, the official guides for the CUDA setup for WSL2/Linux are predominantly Ubuntu-specific. Here's to you, Arch!
- Make sure that your Windows meets the dependencies and that your WSL2 is set up. See these instructions.
Archlinux is not among the default distributions available for WSL2. We'll install it from a tarball instead, a functionality offered natively by the WSL.
# Make zsh start INSTANTLY with this one weird trick. | |
# | |
# https://asciinema.org/a/274255 | |
# | |
# HOW TO USE | |
# | |
# 1. Download this script. | |
# | |
# curl -fsSL -o ~/instant-zsh.zsh https://gist.github.com/romkatv/8b318a610dc302bdbe1487bb1847ad99/raw | |
# |