Skip to content

Instantly share code, notes, and snippets.

@m-Just
m-Just / launch.sh
Last active December 26, 2023 09:18
[git] commit-tracking program launching script with runtime code isolation
#!/bin/bash
set -e
# parse arguments
POSITIONAL_ARGS=()
while [[ $# -gt 0 ]]; do
case $1 in
-R|--restart) # fresh restart of a job with the current commit (previous work will be lost)
RESTART=Y
@m-Just
m-Just / split_pdf_preserving_reflink.sh
Last active November 17, 2021 07:49
Split PDF while preserving link redirection
@m-Just
m-Just / install_tmux_from_source.sh
Last active September 27, 2021 09:02
Install tmux without root access (from source)
#!/bin/bash
# Adapted from https://gist.github.com/ryin/3106801
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
defshell -bash
altscreen on
autodetach on
caption always "%{= kw}%-w%{= kG}%{+b}[%n %t]%{-b}%{= kw}%+w %=%d %M %0c %{g}%H%{-}"
# huge scrollback buffer
defscrollback 5000
# switch windows with F3 (prev) and F4 (next)
" musts
scriptencoding utf-8
set nocompatible
syntax on
" highlight search (ctrl+l to remove highlights)
set hlsearch
nnoremap <C-L> :nohl<CR><C-L>
" lower letter search ignore cases