Published: 2020-12-3
Filed under:
install Xcode
xcode-select --install
Generate a SSK key and config file
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519
Host bitbucket.cfdata.org stash.cfops.it
HostName git.cfdata.org
ProxyCommand /usr/local/bin/cloudflared access ssh --hostname %h
Host ssh-origin.demo.pablocamino.com ssh-origin.demo.pablocamino.com
HostName ssh-origin.demo.pablocamino.com
ProxyCommand /usr/local/bin/cloudflared access ssh --hostname %h
Install Brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Create Cloudflare folder
cd
mkdir cloudflare
Install mcfly
brew tap cantino/mcfly
brew install mcfly
Install OMZ
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Update the zshrc file
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$PATH:/Users/pablo/Library/Python/3.7/bin
# Path to your oh-my-zsh installation.
export ZSH="/Users/pablo/.oh-my-zsh"
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="jispwoso"
plugins=(
git
)
source $ZSH/oh-my-zsh.sh
# Change to Cloudflare folder
cd /Users/pablo/cloudflare
# logs into clickhouse to the correct cluster - using CLOUDFLARE ACCESS
function clickhouse-cli-access {
case "$1" in
root)
endpoint="https://clickhouse-pdx-root.bi.cfdata.org"
;;
bots)
endpoint="https://clickhouse-pdx-bot-detection.bi.cfdata.org"
;;
*)
echo "Usage: $0 {root|bots}"
return 1
esac
echo "Logging into $endpoint"
cloudflared access login $endpoint
ACCESS_COOKIE=CF_Authorization=$(cloudflared access token -app=$endpoint) /Users/pablo/Library/Python/3.7/bin/clickhouse-cli
}
flush-dns() {
sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder; echo "DNS cache flushed"
}
function lazygit() {
git add -A
git commit -a -m "$1"
git push origin main
}
# User exxport's
export cloudflare_email=pablo@cloudflare.com
export cloudflare_token=4fc8f290a1f91e8a7faf3d96fbb65c6382c13
export cloudflare_zone=pablocamino.com
export cloudflare_zone_id=f6d60f90bc2524a40dc09faee1a09f58
export cloudflare_account_id=34b997156ecb8727cc35124280a1e0a9
export gcloud_api_personal=AIzaSyAQ5sB0Otk18mbRa2UG4JD4MzjfTDax3hA
export fauna_secret=fnAEKO3mV5ACBg7LbAQsuISjn1OGI4idUcnrl0hL
export github_token=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
eval "$(mcfly init zsh)"