Skip to content

Instantly share code, notes, and snippets.

View alchen99's full-sized avatar

Alice Chen alchen99

View GitHub Profile
@alchen99
alchen99 / .vimrc
Last active December 20, 2023 23:08
VIM conf
set nocompatible
set autoindent
set showcmd
set shiftwidth=4
set softtabstop=4
set tabstop=4
set expandtab
set showmatch
set nohlsearch
set expandtab
@alchen99
alchen99 / .bashrc-ext
Last active December 20, 2023 23:00
Bashrc extended config
# additional setup for remote VM
set -o vi
alias screendr='/usr/bin/screen -DR'
alias tmuxdr='/usr/bin/tmux attach-session -d'
# Terminal colors
export COLOR_NC='\e[0m' # No Color
export COLOR_BLACK='\e[0;30m'
export COLOR_GRAY='\e[1;30m'
export COLOR_RED='\e[0;31m'
[user]
name = Alice Chen
email = alice.chen@opencontext.com
[core]
editor = vim
[color]
diff = auto
status = auto
branch = auto
ui = true
@alchen99
alchen99 / delAllObjectVersions.sh
Created January 31, 2022 22:09
delAllObjectVersions.sh
#!/bin/bash
# We are assuming default region and profile
bucket=$1
set -e
echo "Removing all versions from $bucket"
versions=`aws s3api list-object-versions --bucket $bucket |jq '.Versions'`
@alchen99
alchen99 / nginx.stub
Created January 31, 2022 17:39
nginx.stub
<!DOCTYPE html>
<html>
<head>
<title>CHANGEME</title>
<style>
body {
width: 35em;
margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif;
}
test -e "${HOME}/.iterm2_shell_integration.bash" && source "${HOME}/.iterm2_shell_integration.bash"
test -e "${HOME}/azure.completion.sh" && source "${HOME}/azure.completion.sh"
test -e "/usr/local/azure-cli/az.completion" && source '/usr/local/azure-cli/az.completion'
if [[ -f $HOME/.bashrc ]]; then source $HOME/.bashrc; fi
if [[ -f $HOME/.profile ]]; then source $HOME/.profile; fi
test -e "${HOME}/.iterm2_shell_integration.bash" && source "${HOME}/.iterm2_shell_integration.bash"
test -e "${HOME}/lib/azure-cli/az.completion" && source "${HOME}/lib/azure-cli/az.completion"
export PATH=$PATH:$HOME/bin
# The next line updates PATH for the Google Cloud SDK.
if [ -f "${HOME}/google-cloud-sdk/path.bash.inc" ]; then . "${HOME}/google-cloud-sdk/path.bash.inc"; fi
# .bashrc on Mac - requires several GNU utlities to be installed to work
# Silence Bash Deprecation warning
export BASH_SILENCE_DEPRECATION_WARNING=1
# User specific aliases and functions
# set TERM to 256 color
export TERM=xterm-256color
# set up LS_COLORS
export LS_COLORS='rs=0:di=01;36:ln=01;93:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=30;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01
# additional setup for remote VM
alias screendr='/usr/bin/screen -DR'
alias tmuxdr='/usr/bin/tmux attach-session -d'
# Terminal colors
export COLOR_NC='\e[0m' # No Color
export COLOR_BLACK='\e[0;30m'
export COLOR_GRAY='\e[1;30m'
export COLOR_RED='\e[0;31m'
export COLOR_LIGHT_RED='\e[1;31m'
@alchen99
alchen99 / cloud-init-minnaker-armory
Last active October 28, 2021 21:31
Cloud Init / Userdata for setting up Minnaker using Operator
#cloud-config
repo_update: true
repo_upgrade: all
packages:
- curl
- make
- screen
- tmux
- tree