Skip to content

Instantly share code, notes, and snippets.

View kkoziarski's full-sized avatar

Krzysztof Koziarski kkoziarski

View GitHub Profile
@kkoziarski
kkoziarski / .gitattributes
Last active December 28, 2022 20:47
Polyglot Notebook (.NET Interactive notebooks) - dynamic programming - introduction
View .gitattributes
###############################################################################
# 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 18:54
Polyglot Notebook (.NET Interactive notebooks) - dynamic programming - helpers
View .gitattributes
###############################################################################
# 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
View .gitattributes
###############################################################################
# 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
View VIM-.vimrc
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
View jira-copy-description-bookmarklet.js
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
View key-bindings.ahk
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
View function-wrappers.ts
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
View readme.md
@kkoziarski
kkoziarski / copy-jwt-token-bookmarklet.js
Created March 16, 2020 09:25
copy JWT token bookmarklet (jwt-cp)
View copy-jwt-token-bookmarklet.js
javascript: (function() {
var key = window.localStorage.getItem('adal.token.keys').split('|')[0];
var token = window.localStorage.getItem('adal.access.token.key' + key);
if (token) {
/*window.prompt("Copy to clipboard: Ctrl+C, Enter", token);*/
sendToClipbord(token);
}
function sendToClipbord(myString) {
var textarea = document.createElement('textarea');
document.body.appendChild(textarea);