Skip to content

Instantly share code, notes, and snippets.

@amass01
amass01 / .tmuxconf
Created March 9, 2022 23:45
.tmuxconf
View .tmuxconf
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@amass01
amass01 / .zshrc
Last active March 11, 2022 18:06
.zshrc
View .zshrc
export GOPATH=$HOME/go
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$GOPATH/bin:/usr/local/go/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
export DBPASS="grrr"
export MYSQL_ROOT_PASSWORD=$DBPASS
@amass01
amass01 / .vimrc
Last active March 10, 2022 17:40
.vimrc
View .vimrc
" PLUGINS VIA VUNDLE
" Vundle Commands
" :PluginList - lists configured plugins
" :PluginInstall - installs plugins; append `!` to update or just :PluginUpdate
" :PluginSearch foo - searches for foo; append `!` to refresh local cache
" :PluginClean - confirms removal of unused plugins; append `!` to auto-approve removal
" :PluginUpdate - checks installed plugins for updates
" when making changes, you must reload the file before running Vundle commands
View useMountEffect.js
import { useEffect } from "react";
/**
* useMountEffect is a custom hook to run an effect on mount
* only once, it accepts an effect/function and executes it
* only after succesful mount (empty array as second argument
* in useEffect call)
*
* @param {*} fun - effect to run on mount
*/