Skip to content

Instantly share code, notes, and snippets.

View vbrozik's full-sized avatar
☮️
Ukraine stay strong

Václav Brožík vbrozik

☮️
Ukraine stay strong
  • NTT Czech Republic
  • Czech Republic
  • 07:44 (UTC +02:00)
View GitHub Profile
@vbrozik
vbrozik / README.md
Last active October 19, 2023 14:41
jq JSON query
@vbrozik
vbrozik / test_len.sh
Last active September 21, 2023 06:55
Test file line length limits in a shell in Linux
#!/bin/sh
# test_len.sh
# This script is used to test the maximum line length that can be processed
# using read -r and eval.
# testing line lengths divided by 10:
test_lengths='409 410 900 1800'
@vbrozik
vbrozik / README.md
Last active August 9, 2023 17:28
Shell - snippets

Shell snippets

# print repeated character
printf '%.1s' ={1..20}
@vbrozik
vbrozik / google_bard.md
Last active July 24, 2023 16:07
AI language models

Google Bard

  • https://bard.google.com/

  • free

  • Google account needed

  • history, editable queries

  • multiple responses, response tuning (tone, length)

  • subjective

@vbrozik
vbrozik / README.md
Last active July 17, 2023 12:55
Terminal apps - keyboard shortcuts

Terminal applications - keyboard shortcuts

Conventions and general notes

  • Mod1+Mod2+key - modifier key 1, modifier key 2, key pressed at the same time
  • key_comb1, key_comb2 - sequence of key combination 1 followed by key combination 2
  • Normally Alt+key works the same as Esc, key (pause after Esc must not be long)
    • In the descriptions Alt+key is preferred
  • Alt is also called Meta
@vbrozik
vbrozik / README.md
Last active June 29, 2023 15:45
GitHub CLI

GitHub CLI (gh)

Useful scripts

# list all my repositories
gh repo list --json nameWithOwner --jq '.[].nameWithOwner'

# gh api
@vbrozik
vbrozik / RADME.md
Last active June 25, 2023 20:45
Bash - customizations

Bash - customizations

Command history

Settings in .bashrc:

# separate history files
HISTFILE=$HOME/.history/$(date +%y%m%d.%H%M%S).$USER.$TERM.$SSH_PORT.$$
@vbrozik
vbrozik / README.md
Last active June 25, 2023 09:16
Windows 11 customizations

Windows 11 Customizations

GUI

# Nastavení taskbar etc.
Get-Item -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced'

Networking

@vbrozik
vbrozik / README.md
Last active June 30, 2023 18:04
Git - useful commands

Git - useful commands

git diff

# Check staged changes in minimal diff (just file names and changed lines)
# keeping coloring, less needs -R to pass colors
git diff --staged -U0 --color | grep -Pv '^(\e\[.{1,2}m)?(---|\+\+\+|index)' | less

# Note: None of these codes for ASCII ESC worked in GNU grep -E \e \x1b \033
@vbrozik
vbrozik / .cspell.json
Last active June 15, 2023 12:03
Python - my commonly used libraries
{
"ignoreWords": ["appdirs"]
}