Skip to content

Instantly share code, notes, and snippets.

View mgrzaslewicz's full-sized avatar

Mikołaj Grząślewicz mgrzaslewicz

View GitHub Profile
@mgrzaslewicz
mgrzaslewicz / .tmux.conf
Created January 11, 2022 11:34
tmux config
# rebind control key
set -g prefix C-Space
unbind C-b
set-option -g history-limit 10000
# count windows from 1
set -g base-index 1
# Enable mouse control (clickable windows, panes, resizable panes)
@mgrzaslewicz
mgrzaslewicz / .ideavimrc
Last active February 16, 2021 13:40
intellij idea vim settings
imap kj <Esc>
set so=999
# reload settings after modifying the file
# :source ~/.ideavimrc
# https://stackoverflow.com/questions/3776117/what-is-the-difference-between-the-remap-noremap-nnoremap-and-vnoremap-mapping
@mgrzaslewicz
mgrzaslewicz / .sublime-keymap.json
Last active September 11, 2020 07:25
.sublime-keymap
[
{ "keys": ["k", "j"], "command": "exit_insert_mode",
"context":
[
{ "key": "setting.command_mode", "operand": false },
{ "key": "setting.is_widget", "operand": false }
]
}
]
IdeaVim
Ideolog
JSON To Kotlin Class
lombok
plantUML integration
stack trace to UML
Active Intellij Tab Highlighter
Advanced Java Folding
HighLightBracketPair
@mgrzaslewicz
mgrzaslewicz / Monokai.sublime-color-scheme
Last active January 28, 2021 10:57
Sublime plugins and settings
# Open with PackageResourceViewer, color scheme default, monokai
"globals":
{
"line_highlight": "color(hsl(148, 100%, 25%))",
}
# open with PackageResourceViewer, theme, default
{
"class": "minimap_control",
"settings": ["always_show_minimap_viewport"],
@mgrzaslewicz
mgrzaslewicz / process-resources.sh
Last active June 17, 2020 18:18
List resources used by a process (open sockets, open files, memory)
# all open descriptors
ls -l /proc/{pid}/fd
lsof -a -p {pid}
# memory
# socket connections
# open files
# prompt - show last 2 directories and time at the end
PROMPT_DIRTRIM=2
PS1="\[\e[33m\]\w\[\e[m\] \[\e[36m\]\t\[\e[m\] $ "
# setup variables
mkdir ~/tmp
MY_TMP=~/tmp
# tmux
alias tmux-print-screen="tmux capture-pane -pS -1000000"
@mgrzaslewicz
mgrzaslewicz / ubuntu-provision.sh
Last active December 19, 2022 16:29
Ubuntu provision
# To have by default: apt install $something --yes # --force-yes
## at first it was:
## sudo "echo 'APT::Get::Assume-Yes \"true\";'" > /etc/apt/apt.conf.d/90forceyes
## but it gives permission denied, because the stream redirect will not be run as super user
sudo bash -c "echo 'APT::Get::Assume-Yes \"true\";' > /etc/apt/apt.conf.d/90yes"
# sudo bash -c "echo 'APT::Get::force-yes \"true\";' >> /etc/apt/apt.conf.d/90yes" # this one is potentialy harmful
# terminal
sudo apt install zsh
@mgrzaslewicz
mgrzaslewicz / windows-provision.sh
Last active June 20, 2021 18:10
Windows provision
#console
choco install sudo -Y
choco install cmder -Y
choco install wget -Y
#file browsing
choco install filezilla -Y
choco install totalcommander -Y
choco install tor-browser -Y
@mgrzaslewicz
mgrzaslewicz / git-bisect.sh
Created March 13, 2018 10:44
git automatic bisect
git bisect start
git bisect bad
git bisect good version-tag
git bisect run ./build.sh #mvn clean install