Skip to content

Instantly share code, notes, and snippets.

@technic
technic / README.md
Last active October 27, 2022 23:11
change font linespacing for dummy editor #linux #ttf #qtcreator

How to change font linespacing

Manual

You need to manipulate a ttf file. I found such a script that comes with Input font at http://input.fontbureau.com. So we copy DejaVuSansMono ttf files to ~/.fonts/ and create a new font DejaVuSansMonoH. I changed line 147, to match this font name, and run

#!/bin/sh
id=`xprop -root _NET_ACTIVE_WINDOW |awk -F ' ' '{print $NF}'`
echo "id $id"
echo `xprop -id "$id" _MOTIF_WM_HINTS`
val=`xprop -id "$id" _MOTIF_WM_HINTS |awk -F '=' '{print $2}' |awk -F ', ' '{print $3}'`
echo "now $val"
if test "$val" -eq 1
then
echo "set 0"
xprop -id "$id" -f _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS "0x2, 0x0, 0x0, 0x0, 0x0"
@technic
technic / virtualbox.txt
Last active November 5, 2017 14:58
how to get alt+tab
in Input->Keyboard->KeyboardSettings set auto capture keyboard = false
@technic
technic / .bash_logout
Created December 8, 2017 20:46
bash_logout
# ~/.bash_logout: executed by bash(1) when login shell exits.
# when leaving the console clear the screen to increase privacy
if [ "$SHLVL" = 1 ]; then
[ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
fi
@technic
technic / lyx-commands
Created February 20, 2018 12:53
Lyx command sequences to instert references of EqRef and Format types
command-sequence label-insert [_CURSOR_]; inset-insert ref LatexCommand eqref reference "_CURSOR_" \end_inset; char-left; inset-settings ref; char-delete-backward; char-right;
command-sequence label-insert [_CURSOR_]; inset-insert ref LatexCommand formatted reference "_CURSOR_" \end_inset; char-left; inset-settings ref; char-delete-backward; char-right;
@technic
technic / Cargo.toml
Last active May 18, 2018 17:24
rust iron webframework middleware shared state example with RwLock
[package]
name = "iron-shared-example"
version = "0.1.0"
authors = ["Alex Maystrenko <[email protected]>"]
[dependencies]
iron = "*"
router = "*"
persistent = "*"
urlencoded = "*"
@technic
technic / example.xml
Created June 16, 2018 18:03
Kate magic lines
<!-- kate: space-indent on; indent-width 2; replace-tabs on; -->
@technic
technic / technic.zsh-theme
Last active July 5, 2018 13:09
my oh-my-zsh theme
# technic mod of bira theme
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
if [[ $UID -eq 0 ]]; then
local user_host='%{$terminfo[bold]$fg[red]%}%n@%m%{$reset_color%}'
local user_symbol='#'
else
local user_host='%{$terminfo[bold]$fg[green]%}%n@%m%{$reset_color%}'
local user_symbol='$'
@technic
technic / .gitignore
Last active July 12, 2018 12:10
Jupyter notebook cheat sheat
*.aux
*.log
*.out
*.tex
@technic
technic / README.md
Created October 17, 2018 09:59
Increase margin/border in LyX editor area.

Go to Document -> Settings -> Local layout and enter something like

LeftMargin MM
RightMargin MM

Done! Thx to this forum topic