Skip to content

Instantly share code, notes, and snippets.

View nirnejak's full-sized avatar
🎨
Crafting Interfaces

Jitendra Nirnejak nirnejak

🎨
Crafting Interfaces
View GitHub Profile
@nirnejak
nirnejak / settings.jsonc
Last active June 6, 2023 19:04
Jitendra Nirnejak's Editor Configuration
{
"editor.tabSize": 2,
"editor.fontSize": 14,
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.fontLigatures": true,
"editor.fontFamily": "JetBrains Mono, monospace",
"editor.fontWeight": "400",
"editor.suggest.preview": true,
"editor.suggestSelection": "first",
ZSH_THEME="vercel"
export UPDATE_ZSH_DAYS=1
plugins=(
git
sudo
macos
docker
docker-compose
call plug#begin('~/.vim/plugged')
Plug 'mxw/vim-jsx'
Plug 'pangloss/vim-javascript'
Plug 'ap/vim-css-color'
Plug 'mattn/emmet-vim' " <C-y> + , for completion
Plug 'matze/vim-move'
Plug 'prettier/vim-prettier', { 'for': ['javascript', 'typescript', 'css', 'less', 'scss', 'json', 'graphql', 'markdown', 'vue', 'yaml', 'html'] }
Plug 'eslint/eslint'
" npm i -g prettier
import Vue from 'vue'
import axios from 'axios'
import NProgress from 'nprogress'
import * as Sentry from '@sentry/browser'
if (process.env.NODE_ENV === 'production') {
axios.defaults.baseURL = 'https://api.myserver.com/api'
} else {
axios.defaults.baseURL = 'https://mystagingserver.herokuapp.com/api'
// axios.defaults.baseURL = 'http://localhost:3000/api'
[
// Terminal
{ "key": "cmd+shift+j", "command": "workbench.action.terminal.focusNext" },
{
"key": "cmd+shift+k",
"command": "workbench.action.terminal.focusPrevious"
},
{
"key": "shift+alt+`",
"command": "workbench.action.toggleMaximizedPanel"
/$$$$$$$$ /$$$$$$$$ /$$$$$$ /$$$$$$$$ /$$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$$ /$$$$$$$
|__ $$__/| $$_____/ /$$__ $$|__ $$__/ | $$__ $$ /$$__ $$ /$$__ $$ /$$__ $$| $$_____/| $$__ $$
| $$ | $$ | $$ \__/ | $$ | $$ \ $$| $$ \ $$| $$ \__/| $$ \__/| $$ | $$ \ $$
| $$ | $$$$$ | $$$$$$ | $$ | $$$$$$$/| $$$$$$$$| $$$$$$ | $$$$$$ | $$$$$ | $$ | $$
| $$ | $$__/ \____ $$ | $$ | $$____/ | $$__ $$ \____ $$ \____ $$| $$__/ | $$ | $$
| $$ | $$ /$$ \ $$ | $$ | $$ | $$ | $$ /$$ \ $$ /$$ \ $$| $$ | $$ | $$
| $$ | $$$$$$$$| $$$$$$/ | $$ | $$ | $$ | $$| $$$$$$/| $$$$$$/| $$$$$$$$| $$$$$$$/
|__/ |________/ \______/ |__/ |__/ |__/ |__/ \______/ \______/ |________/|_______/
import React from "react"
const useClickOutside = (ref, callback) => {
const handleClick = (e) => {
if (ref.current && !ref.current.contains(e.target)) {
callback()
}
}
React.useEffect(() => {
document.addEventListener("click", handleClick)
import React from "react"
import { navigate } from "gatsby"
import NProgress from "nprogress"
import PropTypes from "prop-types"
import { accountRegister, tokenCreate } from "../graphql/user"
const initialState = {
@nirnejak
nirnejak / vercel.zsh-theme
Created September 19, 2021 18:29
Vercel Zsh Theme(Modified)
local resetColor="%{$reset_color%}"
local logo="%{$fg_bold[white]%}▲$resetColor$resetColor"
# local hostname=`hostname`
local dir="%{$fg_bold[white]%}%c$resetColor$resetColor"
GIT_PROMPT_PREFIX="[%{$fg_bold[white]%}"
GIT_PROMPT_SUFFIX="$resetColor] "
GIT_PROMPT_DIRTY="%{$fg_bold[red]%}"
GIT_PROMPT_CLEAN="%{$fg_bold[green]%}"
import * as React from "react"
type ContactFormInput = {
name: string
email: string
message: string
}
const initialState: ContactFormInput = {
name: "",