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
# 𝗙𝗮𝘀𝘁𝗲𝗿 𝗗𝗼𝗰𝗸 𝗛𝗶𝗱𝗶𝗻𝗴: | |
defaults write com.apple.dock autohide-delay -float 0; defaults write com.apple.dock autohide-time-modifier -int 0;killall Dock | |
# 𝗙𝗮𝘀𝘁𝗲𝗿 𝗗𝗼𝗰𝗸 𝗛𝗶𝗱𝗶𝗻𝗴 𝗨𝗻𝗱𝗼: | |
defaults write com.apple.dock autohide-delay -float 0.5; defaults write com.apple.dock autohide-time-modifier -int 0.5 ;killall Dock | |
# 𝗔𝗱𝗱 𝗗𝗼𝗰𝗸 𝗦𝗽𝗮𝗰𝗲𝗿 (paste for each spacer): | |
defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}' && killall Dock | |
# 𝗔𝗱𝗱 𝗛𝗮𝗹𝗳-𝗛𝗲𝗶𝗴𝗵𝘁 𝗗𝗼𝗰𝗸 𝗦𝗽𝗮𝗰𝗲𝗿 (paste for each): | |
defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="small-spacer-tile";}' && killall Dock |
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
"rules": { | |
"react/sort-prop-types": [ | |
"error", | |
{ | |
"callbacksLast": true, | |
"ignoreCase": true, | |
"requiredFirst": true, | |
"sortShapeProp": true, | |
"noSortAlphabetically": false | |
} |
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
[ | |
{ | |
"context": "Editor", | |
"bindings": { | |
"alt-up": "editor::MoveLineUp", | |
"alt-down": "editor::MoveLineDown", | |
"ctrl-cmd-up": "editor::SelectLargerSyntaxNode", | |
"ctrl-cmd-down": "editor::SelectSmallerSyntaxNode" | |
} | |
} |
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
{ | |
"base_keymap": "VSCode", | |
"theme": "Andromeda", | |
"buffer_font_size": 14, | |
"language_overrides": { | |
"JavaScript, TypeScript": { | |
"format_on_save": { | |
"external": { | |
"command": "prettier", | |
"arguments": [ |
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
export default function classNames( | |
...classes: Array<string | boolean | undefined> | |
): string { | |
return classes.filter(Boolean).join(" ") | |
} |
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/sh | |
TYPE=$(gum choose "fix" "feat" "docs" "style" "refactor" "test" "chore" "revert") | |
SCOPE=$(gum input --placeholder "scope") | |
# Since the scope is optional, wrap it in parentheses if it has a value. | |
test -n "$SCOPE" && SCOPE="($SCOPE)" | |
# Pre-populate the input with the type(scope): so that the user may change it | |
SUMMARY=$(gum input --value "$TYPE$SCOPE: " --placeholder "Summary of this change") | |
DESCRIPTION=$(gum write --placeholder "Details of this change (CTRL+D to finish)") |
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
const darkModeMediaQuery = window.matchMedia('(prefers-color-scheme: dark)') | |
handleDarkmode(darkModeMediaQuery) | |
function handleDarkmode(e) { | |
const darkModeOn = e.matches; // true if dark mode is enabled | |
if (darkModeOn) { | |
// TODO: Set Dark Theme | |
} else { |
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
const testObj = { | |
bankId: 13, | |
accounts: [ | |
{ accountName: "abc", currentBalance: { cash: 2000 }, subAccounts: [] }, | |
{ | |
accountName: "bcd", | |
currentBalance: { cash: 5000 }, | |
subAccounts: [ | |
{ | |
accountName: "efg", |
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
import React from "react" | |
const useUserTheme = (): boolean => { | |
const [isDark, setIsDark] = React.useState(false) | |
React.useEffect(() => { | |
window | |
.matchMedia("(prefers-color-scheme: dark)") | |
.addEventListener("change", (event) => { | |
setIsDark(event.matches) |
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
import React from "react" | |
import PropTypes from "prop-types" | |
const initialState = { | |
isAuthenticated: false, | |
} | |
export const AuthContext = React.createContext(initialState) |
NewerOlder