Skip to content

Instantly share code, notes, and snippets.

View Koriit's full-sized avatar

Aleksander Stelmaczonek Koriit

View GitHub Profile
@Koriit
Koriit / GitConfigGlobal.sh WSL2
Last active March 10, 2023 14:08
My git configuration
#!/bin/sh
git config --global alias.discard "checkout --"
git config --global alias.wh "diff --check"
git config --global alias.cp "cherry-pick"
git config --global alias.co "checkout"
git config --global alias.stat "status"
git config --global alias.mt "mergetool"
git config --global alias.br "branch"
git config --global alias.unstage "reset HEAD --"
git config --global alias.sl "stash list"
@Koriit
Koriit / GitExtractSubRepo.txt
Last active March 3, 2017 12:31
GIT: extracting a folder as new repo
# 1. cleanup working dir
git status
git reset --hard HEAD
git clean -nd
git clean -fd
# 2. remove origin refs
git remote rm origin
# 3. remove unnecessary tags and branches
## remove all tags and branches apart for your future master via GUI
## this will speed up the filtering and they need to be removed anyway
# Your keymap
#
# Atom keymaps work similarly to style sheets. Just as style sheets use
# selectors to apply styles to elements, Atom keymaps use selectors to associate
# keystrokes with events in specific contexts. Unlike style sheets however,
# each selector can only be declared once.
#
# You can create a new keybinding in this file by typing "key" and then hitting
# tab.
#
@Koriit
Koriit / .inputrc
Last active November 8, 2018 21:49
set completion-ignore-case on
set show-all-if-ambiguous on
set show-all-if-unmodified on
"\C-i": menu-complete
@Koriit
Koriit / .bashrc
Last active July 14, 2022 23:54
My .bashrc for WSL2
# General
alias ls="ls --group-directories-first --classify --human-readable --color"
alias lsa="ls -A"
alias ll="ls -l"
alias lll="ll | less -r"
alias lla="ll -A"
alias llal="lla | less -r"
alias dk="docker"
alias cls="clear"
= Alphabet
A
B
C
D
E
F
G
H
I
#!/bin/bash
tail -F -n+0 console.out
@Koriit
Koriit / Greenshot.ini
Last active May 8, 2022 21:15
Greenshot configuration backup
; Greenshot core configuration
[Core]
; The language in IETF format (e.g. en-US)
Language=en-US
; Hotkey for starting the region capture
RegionHotkey=Win + S
; Hotkey for starting the window capture
WindowHotkey=Alt + PrintScreen
; Hotkey for starting the fullscreen capture
FullscreenHotkey=PrintScreen
var jsonData = JSON.parse(responseBody);
postman.setEnvironmentVariable("client_access_token", jsonData.access_token);
@Koriit
Koriit / to_camel_case.jq
Created February 8, 2019 13:47
To camel case function for JQ
def to_camel_case: . | ascii_downcase | split("_") | .[0:1] as $first | .[1:] | map(.[1:] as $rest | .[0:1] | ascii_upcase | . + $rest) | $first + . | join("");