This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this snippets allow to list all of the elements which overflow page and is wider than HTML <body/> | |
var docWidth = document.documentElement.offsetWidth; | |
[].forEach.call( | |
document.querySelectorAll('*'), | |
(el) => { | |
if (el.offsetWidth > docWidth) { | |
console.log(el); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### This snippets allow to make a log of work within given date range, used for author timework report: | |
#### all excludes *-lock.* files | |
# make git diff from files on 2 branches excluding package-lock.json, filtered by author and date range | |
git diff main branchB -- . ':(exclude)*-lock.*' --after="2023-05-01" --until="2023-06-01" --author="$(git config --global user.name)" --pretty=format:"%ad - %an: %s" > project_name-"$(git config --global user.name)"-diff-11_2023.txt | |
#make log from whole project filtered by date range and author | |
git log main branchB --since=4.weeks -p --stat --abbrev-commit --author="$(git config --global user.name)" ':(exclude)*-lock.*' > project_name-"$(git config --global user.name)"-diff-01_2023.txt | |
#make log of current branch and the changes for specific author |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For a full list of active aliases, run `alias`. | |
alias dev="cd ~/dev" | |
alias pn="pnpm" | |
# get machine's ip address | |
alias ip="ipconfig getifaddr en0" | |
# edit global zsh configuration | |
alias zshconfig="nano ~/.zshrc" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# (generate only keys, without values) | |
sed 's/=.*/=/' .env > .env.dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git rm --cached --ignore-unmatch filePath --prune-empty --tag-name-filter cat -- --all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// removing the focus outline when not using | |
//keyboard navigation (the CSS :focus-visible selector is polyfilled here). | |
*:focus:not([data-focusvisible-polyfill]){ | |
outline: none; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this will skip search for lines with variable starting with # (hashtag) ex: # VAR1 as its commented out | |
# Ex: we have .env file with variables: | |
# #VAR1=123 | |
# VAR2=xyz | |
# NPM_TOKEN=12312323fdf21313 | |
export "$(grep -vE "^(#.*|\s*)$" .env)" | |
# didn't respond VAR1 as it contain #, so it's commented out. | |
# responds with single value ex NPM_TOKEN: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Goal of tghis script is to prompt for Docker container name, if it's skipped it will used infile defined name of container and then will search for specific container and delete it. | |
# Set container default name as variable | |
CONTAINER=testContainerName | |
echo -n "Enter Docker container name (if skipped default from file will be used): " | |
read containerName | |
# Check if prompted value isNotEmpty | |
if [ $containerName ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- step 3 --> | |
<!-- It's important to add tabindex="-1" to all anchor tags --> | |
<section id="section1" tabindex="-1">Section 1</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data(){ | |
return ({ | |
description:'Description of the site' | |
}) | |
} | |
head(){ | |
return({ | |
title: 'Home page', | |
meta: [ | |
{ |
NewerOlder