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
# Customize BASH PS1 prompt to show current GIT repository and branch. | |
# by Mike Stewart - http://MediaDoneRight.com | |
# SETUP CONSTANTS | |
# Bunch-o-predefined colors. Makes reading code easier than escape sequences. | |
# I don't remember where I found this. o_O | |
# Reset | |
Color_Off=$'\033[0m' # Text Reset |
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
# Ripgrep Syntax | |
# rg <search_pattern> <directory_of_file> | |
# Multiple files | |
# rg <search_pattern> <directory_of_file> <directory_of_file> | |
# Print as vim-compatible results | |
# --vimgrep | |
# Search hidden files | |
--hidden |
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
## exa | |
export EXA_OPTIONS="-F --group-directories-first --color=always" # classify files and group folders for human readability | |
alias ls="lg" # Replaces ls with my alias for exa | |
alias l="exa ${EXA_OPTIONS}" # default | |
alias la="exa -a ${EXA_OPTIONS}" # default + dotfiles | |
alias lg="exa -Ga ${EXA_OPTIONS}" # list as grid + dotfiles | |
alias lg\-="exa -G ${EXA_OPTIONS}" # list as grid | |
alias lgd="exa -GaD ${EXA_OPTIONS}" # list as grid, directories only | |
alias ll="exa -lha --git ${EXA_OPTIONS}" # list permissions + dotfiles | |
alias lld="exa -lhD ${EXA_OPTIONS}" # list permissions + dotfiles + directories |
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 PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$\C " | |
## export CLICOLOR=1 | |
## export LSCOLORS=ExFxBxDxCxegedabagacad | |
## source-all: recursively source all files in a path (or the path itself if applicable) | |
shopt -s nullglob | |
shopt -s dotglob | |
source-all () { |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Document</title> | |
<link rel="stylesheet" href="style.css" /> | |
</head> |
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
async function mainBadTiming() { | |
setTimeout(() => { | |
console.log('hello') | |
}, 1000) | |
console.log('world') | |
} | |
console.log(mainBadTiming()); | |
async function mainWaitForTimeout() { | |
await new Promise((resolve) => { |
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
/* Converts rem units from base-16 to base 10. */ | |
/* No more 76.5px / 16 = 4.78rem, or 25px / 16 = 1.56rem, or 2.2rem * 16 = 35.2px */ | |
/* 2.5rem becomes 25px */ | |
/* 7.65rem becomes 76.5px */ | |
:root { | |
/* Adjusts rem to base-10 equivalent */ | |
font-size: 62.5%; | |
} |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Document</title> | |
<link rel="stylesheet" href="full-width-bleed-style.css" /> | |
</head> | |
<body> |
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
############################################################### | |
Please see "PS1 upgrades, with COLORS!" gist for color variables. | |
https://gist.github.com/connoro7/8c37fb4fb6abd6bca0c5cc13259e30c7 | |
############################################################### | |
## Git | |
## add | |
alias ga='git add' | |
alias gaa='git add -A && git status' | |
## branch |
NewerOlder