Skip to content

Instantly share code, notes, and snippets.

@jottr
jottr / readline_shortcuts.md
Last active March 21, 2024 20:08
readline shortcuts

Readline

GNU readline is a commonly used library for line-editing; it is used for example by Bash, FTP, and many more (see the details of [readline][5] package under "Required By" for more examples). readline is also customizable (see man page for details).

Keyboard Shortcut Description

Ctrl+l Clear the screen

Cursor Movement

@jottr
jottr / i3-get-window-criteria
Last active September 26, 2023 00:05
Get window criteria to use with i3 window placement. Taken from: http://bit.ly/1e9pcfe
#!/bin/sh
# i3-get-window-criteria - Get criteria for use with i3 config commands
# To use, run this script, then click on a window.
# Output is in the format: [<name>=<value> <name>=<value> ...]
# Known problem: when WM_NAME is used as fallback for the 'title="<string>"' criterion,
# quotes in "<string>" are not escaped properly. This is a problem with the output of `xprop`,
# reported upstream: https://bugs.freedesktop.org/show_bug.cgi?id=66807
@jottr
jottr / gist:679617aba5a7b09d1039
Created December 13, 2015 19:13 — forked from dbiesecke/movies.m3u
pvr.iptvsimple iptvde.m3u
#EXTM3U
#EXTINF:-1 tvg-id="ARD.de" tvg-logo="ard.png",ARD
http://daserste_live-lh.akamaihd.net/i/daserste_de@91204/master.m3u8
#EXTINF:-1 tvg-id="ZDF.de" tvg-logo="zdf.png",ZDF
http://zdf_hds_de-f.akamaihd.net/i/de14_v1@147090/master.m3u8
#EXTINF:-1 tvg-id="tagesschau24.de" tvg-logo="tagesschau24.png",TAGESSCHAU 24
http://tagesschau-lh.akamaihd.net/i/tagesschau_1@119231/master.m3u8
#EXTINF:-1 tvg-id="ZDFneo.de" tvg-logo="zdfneo.png",ZDF NEO
http://zdf_hds_de-f.akamaihd.net/i/de13_v1@147090/master.m3u8
#EXTINF:-1 tvg-id="ZDFinfo.de" tvg-logo="zdfinfo.png",ZDF INFO
BREAKING BAD
by
Vince Gilligan
5/27/05
AMC
Sony Pictures Television
TEASER
[convert-UUP]
AutoStart =1
AddUpdates =1
Cleanup =0
ResetBase =0
NetFx3 =0
StartVirtual =0
wim2esd =0
SkipISO =0
SkipWinRE =0
@jottr
jottr / install-config.sh
Created January 31, 2022 17:07 — forked from obfischer/install-config.sh
Generate Karabiner Elements configuration out of y YAML document
set -x
cat karabiner.yaml | ruby -r yaml -r json -e 'puts YAML.load($stdin.read).to_json' \
| jq --sort-keys 'del(.definitions)' > karabiner.json
// This renders the wiring diagram for the Makerbase 3D Touch probe for the Crealty 32bit Ender 3v2 board
digraph {
//rankdir=LR;
node [ shape=record ];
touch [label="
<G1> G|
<V> 5V|
<S> S|
@jottr
jottr / pdfcrop
Created December 4, 2015 16:55
A better pdfcrop, which preserves links
#!/bin/bash
# from http://tex.stackexchange.com/questions/42236/pdfcrop-generates-larger-file
function usage () {
echo "Usage: `basename $0` [Options] <input.pdf> [<output.pdf>]"
echo
echo " * Removes white margins from each page in the file. (Default operation)"
echo " * Trims page edges by given amounts. (Alternative operation)"
echo
echo "If only <input.pdf> is given, it is overwritten with the cropped output."
@jottr
jottr / .vimrc
Last active October 5, 2019 00:59 — forked from vinniefranco/gist:4730156
Quickly convert string to array in vim
" Quick array creation
nmap <leader>ta vF=l<Esc>:s/\%V\S\+/"&",/g<CR>A<BS><Esc>vF=2lgS[JJ:let @/ = ""<CR>