forked from matthewtodd/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 1
/
zshrc.sym
65 lines (57 loc) · 1.78 KB
/
zshrc.sym
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
autoload -U +X bashcompinit && bashcompinit # https://github.com/asdf-vm/asdf/issues/692
source $HOMEBREW_PREFIX/share/antigen/antigen.zsh
antigen use oh-my-zsh
antigen bundle robbyrussell/oh-my-zsh plugins/ruby
antigen bundle robbyrussell/oh-my-zsh plugins/asdf
antigen bundle git
antigen bundle heroku
antigen bundle command-not-found
antigen bundle common-aliases
antigen bundle brew
antigen bundle compleat
antigen bundle macos
antigen bundle zsh-users/zsh-completions
antigen bundle zsh-users/zsh-syntax-highlighting
antigen bundle zsh-users/zsh-autosuggestions
antigen theme denysdovhan/spaceship-prompt
antigen apply
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
bindkey -e
# End of lines configured by zsh-newuser-install
export ALTERNATIVE_EDITOR=""
export EDITOR="emacsclient -t"
# Aliases
alias cdd="cd ~/projects/dotfiles"
alias cdp="cd ~/projects"
alias e="$EDITOR"
alias be="bundle exec"
alias ag="ag --color-line-number '1;34'"
if hash hub 2>/dev/null; then
eval "$(hub alias -s)"
fi
cloud() {
if hash ion-client 2>/dev/null; then
if [ ! -f ~/.ion-client-shell ]; then
ion-client shell > ~/.ion-client-shell
fi
source ~/.ion-client-shell
cloud "$@"
else
echo "ion-client not installed"
fi
}
endpoint_check() {
domain="${1}"
dns_target="${2:-$domain}"
openssl s_client -connect $dns_target:443 -servername $domain </dev/null 2>/dev/null \
| openssl x509 -inform pem -noout -text -certopt no_header,no_pubkey,no_sigdump,no_signame,no_version\
| egrep -i 'issuer:|subject:|after|DNS:'
curl -I https://$dns_target --connect-to $dns_target::$domain:
}
create_cert() {
domain="${1}"
openssl req -subj "/CN=$domain/C=US" -new -newkey rsa:2048 -sha256 -days 365 -nodes -x509 -keyout server.key -out server.crt
}