Skip to content

Instantly share code, notes, and snippets.

View kkoziarski's full-sized avatar

Krzysztof Koziarski kkoziarski

View GitHub Profile
@kkoziarski
kkoziarski / Git-Worktree.ps1
Last active April 7, 2024 19:00
Create git worktree from powershell
function Git-Worktree {
[CmdletBinding()]
Param(
[Parameter(Mandatory=$true)]
[string]$BranchName,
[Parameter(Mandatory=$false)]
[switch]$Delete,
[Parameter(Mandatory=$false)]
[switch]$Current
)
@kkoziarski
kkoziarski / .gitattributes
Last active March 25, 2024 07:43
Polyglot Notebook (.NET Interactive notebooks) - dynamic programming - helpers
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
# Never modify line endings of dib files
*.dib text eol=lf
@kkoziarski
kkoziarski / .gitattributes
Last active December 28, 2022 20:47
Polyglot Notebook (.NET Interactive notebooks) - dynamic programming - introduction
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
# Never modify line endings of dib files
*.dib text eol=lf
@kkoziarski
kkoziarski / .gitattributes
Last active December 27, 2022 17:34
Polyglot Notebook (.NET Interactive notebooks) - setup
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
# Never modify line endings of dib files
*.dib text eol=lf
@kkoziarski
kkoziarski / VIM-.vimrc
Last active October 21, 2021 12:26
VIM
syntax on
" pokazuje menu z lista plikow itp
set wildmenu
"sam zmienia katalogi na te w kotrych edytuje pliki
set autochdir
set autoindent
set history=1000
@kkoziarski
kkoziarski / jira-copy-description-bookmarklet.js
Last active October 2, 2021 20:35
Copy JIRA issue number bookmarklet
javascript: (function() {
var id;
var descr;
var a = document.querySelector('#ghx-detail-issue .ghx-group .ghx-key dl.ghx-detail-list dd a');
if (a) {
/*side details*/
id = a.textContent;
descr = document.querySelector('#ghx-detail-issue .ghx-group .ghx-detail-summary dl.ghx-detail-list dd.ghx-detail-description').textContent;
} else if (a = document.getElementById("key-val")) {
/*full page details*/
@kkoziarski
kkoziarski / key-bindings.ahk
Last active May 26, 2021 06:43
AutoHotkey (AHK) - open programs
SwitchToWindowsTerminal()
{
windowHandleId := WinExist("ahk_exe WindowsTerminal.exe")
windowExistsAlready := windowHandleId > 0
; If the Windows Terminal is already open, determine if we should put it in focus or minimize it.
if (windowExistsAlready = true)
{
activeWindowHandleId := WinExist("A")
windowIsAlreadyActive := activeWindowHandleId == windowHandleId
const foo1 = (a: string): number =>
{
console.log('foo1', {a});
return a.length;
}
const foo2 = (a: string, b: number): number => {
console.log('foo2', {a, b});
return a.length + b;
}
@kkoziarski
kkoziarski / readme.md
Last active April 6, 2021 12:51
How to run Docker Desktop on Windows 10 Home with WSL2
@kkoziarski
kkoziarski / .git-commands.md
Last active January 29, 2021 09:45 — forked from hofmannsven/README.md
Git Cheatsheet