This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_digit_at(number, place) -> int: | |
int_part, _, frac_part = f"{number}".partition('.') | |
if place > 0: | |
if place > len(int_part): | |
return 0 | |
return int(int_part[-place]) | |
elif place < 0: | |
idx = abs(place) - 1 | |
if idx >= len(frac_part): | |
return -1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -name '*.xmind' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo mkdir /usr/share/fonts/adobe-source-code-pro | |
fontpath="/usr/share/fonts/adobe-source-code-pro" | |
wget https://github.com/adobe-fonts/source-code-pro/releases/download/2.030R-ro%2F1.050R-it/source-code-pro-2.030R-ro-1.050R-it.zip | |
unzip source-code-pro-2.030R-ro-1.050R-it.zip | |
cp source-code-pro-*-it/OTF/*.otf $fontpath | |
fc-cache -f -v |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# remapping each symbol according to the sequence: | |
# layout_1 shift_layout_1 layout_2 shift_layout_2 alt_gr_layout_1 [shift_alt_gr_layout_1] | |
keycode 43 = h H Cyrillic_er Cyrillic_ER Left | |
keycode 44 = j J Cyrillic_o Cyrillic_O Down | |
keycode 45 = k K Cyrillic_el Cyrillic_EL Up Up | |
keycode 46 = l L Cyrillic_de Cyrillic_DE Right Right | |
keycode 48 = apostrophe quotedbl Cyrillic_e Cyrillic_E dead_acute dead_diaeresis Ukrainian_ie Ukrainian_IE | |
keycode 49 = grave asciitilde U2019 apostrophe dead_grave dead_tilde U0301 asciitilde | |
keycode 12 = 3 numbersign 3 numbersign threesuperior dead_macron section U20B4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# will grep both .md and xmind | |
grep -inr --exclude='*.png' --exclude='*.pdf' "search string" . | |
# messy output, but will show the name of the node in the .xmind | |
grep -ainr --exclude='*.png' --exclude='*.pdf' "search string" . | |
# TODO: take a look at pdfgrep |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# clock format for calendar applet | |
%H:%M %a %e %b w%V d%j | |
# format for vertical panel | |
%n%n%H%n%M%n%n%a%n%n%e%n%b%n%nw%V%n%j |