Skip to content

Instantly share code, notes, and snippets.

@zbyna
zbyna / 2 container.ahk
Created November 6, 2022 04:10
Autohotkey scripts for Linkding backup
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
RunWait, %ComSpec% /C dockerdefault.bat && docker cp "E:/linkding_database/db.sqlite3" linkding:/etc/linkding/data/ && docker container restart linkding
@zbyna
zbyna / Start Linkding.ahk
Created November 6, 2022 04:07
Autohotkey for starting docker and linkding container
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
;RunWait, docker-machine start
;RunWait, dockerdefault.bat
RunWait, %ComSpec% /C docker-machine start && dockerdefault.bat
; RunWait, docker container start linkding ; pravděpodobně není potřeba
@zbyna
zbyna / main.py
Created October 7, 2022 03:33
Locale and its flag for language name
import pycountry
from babel import Locale
from babel.core import LOCALE_ALIASES
import pathlib
import shutil
inputList = ['Czech', 'Bulgarian', 'Chinese', 'English', 'French', 'German', 'Modern Greek (1453-)', 'Hungarian', 'Indonesian', 'Japanese',
'Polish', 'Portuguese(BR)', 'Portuguese', 'Romanian', 'Russian', 'Spanish', 'Turkish']
localeList = []
@zbyna
zbyna / RichTextLabel-font-size.cs
Created April 11, 2022 04:08
Godot how to change font size in RichTextLabel
// adding override Font for default Theme
var fontForExplanation = new DynamicFont();
fontForExplanation.FontData = (Godot.DynamicFontData) GD.Load("res://Fonts/Xolonium-Regular.ttf");
fontForExplanation.Size = 24;
fontForExplanation.UseFilter = true;
fontForExplanation.UseMipmaps = true;
rtlExample.AddFontOverride("normal_font",fontForExplanation);
// or simpler way
var fontForExplanation = rtlExample.GetFont("normal_font","");
@zbyna
zbyna / init.vim
Created November 11, 2021 01:40
c# (omnisharp,firenvim ) neovim coding for Exercism.org in browser (Firefox)
call plug#begin(stdpath('data').'/plugged')
Plug 'glacambre/firenvim', { 'do': { _ -> firenvim#install(0) } }
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'dense-analysis/ale'
Plug 'OmniSharp/omnisharp-vim'
Plug 'prabirshrestha/asyncomplete.vim'
Plug 'tpope/vim-commentary' "comment-out by gc
Plug 'vim-airline/vim-airline' " make statusline awesome
Plug 'vim-airline/vim-airline-themes' " themes for statusline
Plug 'ncm2/float-preview.nvim'
@zbyna
zbyna / firefox
Created September 15, 2021 19:54
Tor-browser 10.5.6 - fix for Ubuntu 14.04
#!/bin/sh
basedir=$(dirname "$0")
add_LD_LIBRARY_PATH() {
if test -z "$LD_LIBRARY_PATH"
then
LD_LIBRARY_PATH="$1"
else
LD_LIBRARY_PATH="$1:$LD_LIBRARY_PATH"
@zbyna
zbyna / Godot.yml
Last active September 1, 2021 18:19
Godot appimage creation
app: Godot
ingredients:
dist: trusty
sources:
- deb http://us.archive.ubuntu.com/ubuntu/ trusty main universe
packages:
- libx11-6
- libxinerama1
- libxcursor1
@zbyna
zbyna / script.vim
Last active October 27, 2020 04:03
VIM - checking reStructuredText (Sphinx) markups used in godot docs - without confirmation
" ONLY in VIM 8.0.1630 and later
" (trim function added see: https://github.com/vim/vim/commit/295ac5ab5e840af6051bed5ec9d9acc3c73445de)
" You can execute more than one command in command line by placing a | between two commands.
" You can execute the file by running this :source <filename>
" :ref:`label-name`
" weblate.org machine translation adds space after : like: : ref:
" %s/: ref: /:ref:/gc - zřejmě bylo špatně :-) stane se :-)
%s/: ref: / :ref:/g
%s/: kbd: / :kbd:/g
@zbyna
zbyna / script.vim
Last active August 27, 2020 23:47
substitute command :s with script
" pokus - 1 search for items with at least 1 char between asterisks eg: not **
" 2 substitute them with the same string with stripped spaces
" list - mujList - is here for testing purposes
let flags = ''
let mujList = []
call cursor(1,1)
while search('\*\(.\{-}\)\*', flags,line("$")) > 0
" last search register "/
let @/='\*\(.\{-}\)\*'
" trigger next search using gn object and copy it
@zbyna
zbyna / Vimium - scrolling like in VIM.txt
Last active September 15, 2021 19:51
Vimium - scrolling like in VIM
# Insert your preferred key mappings here.
unmap d
map <c-d> scrollPageDown
unmap u
map <c-u> scrollPageUp
map <c-f> scrollFullPageDown
map <c-b> scrollFullPageUp