This file contains hidden or 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
| { | |
| "printWidth": 100, | |
| "tabWidth": 4, | |
| "semi": false, | |
| "singleQuote": true, | |
| "trailingComma": "none", | |
| "plugins": ["prettier-plugin-tailwindcss", "prettier-plugin-sort-imports"], | |
| "importOrders": [ | |
| "^@/pages/(.*)$", | |
| "^@/components/(.*)$", |
This file contains hidden or 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
| # You need to give this file permission to execute by doing the following... | |
| # chmod +x f.sh | |
| # Add an alias named f to your .zshrc file like this: | |
| # alias f="/Users/brad/Documents/shell-scripts/f.sh" | |
| code "$(find ~/Documents ~/Desktop ~/Sites ~/Local\ Sites -type d \( -name "node_modules" -o -name ".next" -o -name ".git" -o -name "vendor" -o -name "wp-includes" -o -name "wp-admin" \) -prune -o -type d | fzf)" | |
| # todo someday | |
| # currently it only searches for folders, but it would be nice if I could search for zshrc or specific files, but I'm not sure if that will include too many files and be slow... |
This file contains hidden or 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
| import { useEffect, useState } from 'react' | |
| import translate from 'translate' | |
| import ChildComponent from './ChildComponent' | |
| translate.engine = 'deepl' | |
| translate.key = process.env.DEEPL_KEY | |
| export default function TranslateText({ text }) { | |
| const [translatedText, setTranslatedText] = useState() |
This file contains hidden or 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
| It is only happens when we loop over an array and render an input component with different key prop every time. When render the input component react see that I have a different key so he render the whole a new component on vdom. So, we can easily solve this problem by passing the same key (index of an array instead of uuid or something like this) every time. |
This file contains hidden or 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
| // it will fix duplicate dash and empty app icon in dash | |
| sudo apt install gnome-shell-extensions | |
| sudo gnome-extensions disable ubuntu-dock@ubuntu.com |
This file contains hidden or 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
| /* | |
| There is two ways to do that | |
| option 1: add 'cursor: default;' for mobile device | |
| option 2: add '-webkit-tap-highlight-color: transparent;' for elements | |
| */ | |
| /* option 1 */ |
This file contains hidden or 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
| const plugin = require("tailwindcss/plugin"); | |
| module.exports = plugin(function ({ addUtilities, matchUtilities, theme }) { | |
| const scrollbarTrackColorValue = (value) => ({ | |
| '--scrollbar-track': value, | |
| '&::-webkit-scrollbar-track': { | |
| "background-color": value | |
| } | |
| }) |