Skip to content

Instantly share code, notes, and snippets.

View kruzyk's full-sized avatar
🕵️‍♂️
a day is too short

Jacek Krużycki kruzyk

🕵️‍♂️
a day is too short
View GitHub Profile
@kruzyk
kruzyk / move-stashes.md
Created January 9, 2024 23:51 — forked from alexeds/move-stashes.md
Move your stashes from one repo to another

Move your stashes from one repo to another


This was useful for me when we created a new branch for a new major release, but were still working on our current version as well. I cloned our repo again and kept the new project on our new branch, but also wanted to get my stashes there.

Download your stashes

git stash show -p > patch

You'll have to specify your stash and name your file whatevery you want. Do this for as all your stashes, and you'll have patch files in your pwd.

@kruzyk
kruzyk / using-nvda-in-a-windows-vm-on-mac.md
Last active February 14, 2022 21:38 — forked from robertknight/using-nvda-in-a-windows-vm-on-mac.md
Testing the Windows screenreader NVDA on a Mac

How to test NVDA screen reader behaviour on a Mac:

  1. Download Microsoft Edge VM from https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/
  2. Download Virtualbox and import the Edge VM image.

Then in the VM:

  1. Install guest addons in the VM
  2. Download & install latest NVDA from nvaccess.org
  3. Download & install SharpKeys and use it to map left an alternative key (eg. Left Ctrl) to the Insert key. This is needed because Macs do not typically have an “Insert” key which is the prefix for many NVDA commands.
@kruzyk
kruzyk / yarn.md
Created May 4, 2021 20:04
Useful aliases for Yarn

Basic Commands

alias y="yarn"
alias yi="yarn init -y"

Install And Remove Packages

@kruzyk
kruzyk / del-console.sh
Created October 31, 2019 12:55 — forked from houkanshan/del-console.sh
Clear "console.log" before `git commit`, and recover them after `git commit`, add them to git-hooks file: pre-commit & post-commit ~
#!/bin/sh
debug_rex='/console.log/'
debug_print_rex=$debug_rex'p'
debug_del_rex=$debug_rex' d'
add_debug_patch='.add-debug.patch'
del_debug_patch='.del-debug.patch'
git_work_dir="$(git rev-parse --show-toplevel)"
fake_file="$git_work_dir/.fake_file"
cur_dir="$(pwd)"
@kruzyk
kruzyk / polecenia_git.md
Last active September 20, 2019 09:58 — forked from cytrowski/polecenia_git.md
Polecenia GIT

Przydatne polecenia GIT

  • git init - inicjalizuje repozytorium GIT w katalogu
  • git clone {adres repozytorium} - klonuje repozytorium do katalogu
  • git status - pokazuje status repozytorium (pokazuje informację o zmodyfikowanych, nowych, usuniętych oraz nie należące do repozytorium plikach)
  • git remote add {jakaś nazwa} {adres repozytorium} - dodaje repozytorium innego użytkownika (git remote add upstream https://github.com/bluetree-service/idylla.git)
  • git remote -v lista wszystkich zewnetrznych repozytoriów
  • git remote rm {nazwa dla remota} - usuwa zewnętrzne repozytorium
  • git fetch {nazwa remota} - pobiera listę zmian z innego repozytorium (w tym pokazuje nowe gałęzie)
  • git branch - lista gałęzi w repozytorium

Polecenia konsoli Linux

Operacje na plikach i katalogach

  • pwd - aktualny katalog
  • ls -la - listuje wszystkie dostępne pliki
  • ls -lat - listuje wszystkie dostępne pliki posortowane według czasu modyfikacji
  • cp -r {nazwa pliku/katalogu} {miejsce docelowe} - kopiuje plik lub cały katalog z zawartością we wskazane miejsce
  • mv {nazwa pliku/katalogu} {miejsce docelowe} - przenosi plik lub cały katalog z zawartością we wskazane miejsce (jeśli lokalizacja pliku docelowego jest taka sama jak pliku do przeniesienia, zmienia nazwę)
  • du -sh - pokazuje zajętość całego katalogu
  • du -sh * - pokazuje rozmiar poszczególnych plików i katalogów
@kruzyk
kruzyk / README.md
Created January 30, 2019 13:33 — forked from joyrexus/README.md
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})