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 / mail.html
Created January 17, 2020 15:46
Email code tricks
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<!-- Fix DPI Scaling Issues in Outlook -->
<!--[if gte mso 9]>
<xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
<o:PixelsPerInch>96</o:PixelsPerInch>
@kruzyk
kruzyk / settings.json
Last active February 26, 2024 04:34
Visual Studio Code settings
{
// WYGLĄD:
"workbench.iconTheme": "material-icon-theme",
"workbench.colorTheme": "Tomorrow Night Bright Operator Mono",
"workbench.sideBar.location": "right",
"editor.wordWrap": "on",
// "editor.fontFamily": "Operator Mono SSm Lig",
"editor.fontFamily": "Cascadia Code",
"editor.fontLigatures": true,
// "editor.fontWeight": "300", // Light
@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 / pre-commit
Last active October 22, 2019 12:06
GIT pre-commit
#!/bin/sh
# Redirect output to stderr.
exec 1>&2
# enable user input
exec < /dev/tty
consoleregexp='console'
# CHECK
if test $(git diff --cached | grep $consoleregexp | wc -l) != 0
then
@kruzyk
kruzyk / mediaQueries.js
Last active September 20, 2019 09:54
adjust the appearance and behavior depending on the width of the screen (CSS media queries in JS)
function handleProperDevice(x) {
if (x.matches) {
// If media query matches
} else {
// If media query doesn't match
}
}
var x = window.matchMedia("(max-width: 768px)");
@kruzyk
kruzyk / smoothScroll.js
Created September 16, 2019 12:06
smooth scroll for all # (id) internal links
$('a[href^=#]:not([href=#])').on('click', function () {
var element = $($(this).attr('href'));
$('html,body').animate({ scrollTop: element.offset().top },'normal', 'swing');
return false;
});
@kruzyk
kruzyk / npm_commands.md
Last active March 12, 2019 21:28
npm commands

Check outdated npm packages:

  • npm outdated

Install npm-check-updates and update all npm packages:

  • npm i -g npm-check-updates && ncu -u && npm i