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
# Based on gnzhtheme | |
setopt prompt_subst | |
() { | |
local PR_USER PR_USER_OP PR_PROMPT PR_HOST | |
# Check the UID | |
if [[ $UID -ne 0 ]]; then # normal user |
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, { createContext, useRef, useCallback, FC } from "react"; | |
import type { SubscribeFn, Event, Key, Listener } from "./types"; | |
export interface SubscriptionContextType { | |
subscribe: (key: Key, event: Event, subscription: SubscribeFn) => void; | |
unsubscribe: (key: Key) => void; | |
emit: (key: Event, data: any) => void; | |
} | |
const SubscriptionContext = createContext<SubscriptionContextType | null>(null); |
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 |
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
{ | |
"codeLens.enable": false, | |
"eslint.fixOnSaveTimeout": 1, | |
"suggest.noselect": false, | |
"coc.preferences.formatOnSaveFiletypes": ["*"], | |
"python.venvPath": "${env:HOME}/.pyenv/versions", | |
"python.formatting.provider": "black", | |
"python.formatting.provider": "black", | |
"python.formatting.blackPath": "${env:HOME}/.pyenv/shims/black", | |
"python.formatting.blackArgs": ["-l 120"], |
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
# List of plugins | |
set -g @plugin 'tmux-plugins/tpm' | |
set -g @plugin 'tmux-plugins/tmux-sensible' | |
set -g @plugin 'thewtex/tmux-mem-cpu-load' | |
set -g @plugin 'toruticas/tmux-weather' | |
set -g @plugin 'tmux-plugins/tmux-pain-control' | |
set -g @plugin 'tmux-plugins/tmux-prefix-highlight' | |
# Solarized theme | |
set -g @plugin 'seebi/tmux-colors-solarized' |
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 { jest: jestConfig } = require('kcd-scripts/config') | |
module.exports = Object.assign(jestConfig, { | |
globalSetup: '<rootDir>/src/setupJest', | |
modulePaths: ['<rootDir>/src/'], | |
transform: { | |
...jestConfig.transform, | |
'\\.tsx?$': 'ts-jest', | |
'^.+\\.jsx?$': 'babel-jest', |
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
module.exports = { | |
plugins: ['prettier', 'react', '@typescript-eslint'], | |
extends: [ | |
'./node_modules/kcd-scripts/eslint.js', | |
'plugin:@typescript-eslint/eslint-recommended', | |
'plugin:@typescript-eslint/recommended', | |
'prettier/@typescript-eslint', | |
], | |
rules: { | |
'prettier/prettier': 'error', |
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
Show hidden characters
{ | |
"compilerOptions": { | |
"baseUrl": "src/", | |
"target": "es5", | |
"lib": [ | |
"dom", | |
"dom.iterable", | |
"esnext" | |
], | |
"allowJs": true, |
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 ProfileData: FC = () => { | |
const { data, error, isValidating, mutate } = useSWR(GITHUB_PROFILE_API) | |
return ( | |
<div className="ProfileData"> | |
... | |
{error && ( | |
<div className="spinner"> | |
<AlertIcon /> | |
</div> |
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, { Suspense, ReactNode } from 'react' | |
import { cache } from 'swr' | |
import { GITHUB_PROFILE_API } from './api' | |
import { ProfileData } from './ProfileData' | |
import { SkeletonLoading } from './SkeletonLoading' | |
import { ConfusedIcon } from './ConfusedIcon' | |
import './ErrorBoundary.css' |
NewerOlder