mirror of
https://github.com/jakejarvis/dotfiles.git
synced 2026-01-13 04:32:54 -05:00
more GNU replacements
This commit is contained in:
12
Brewfile
12
Brewfile
@@ -43,9 +43,12 @@ brew "bash-completion"
|
|||||||
brew "coreutils"
|
brew "coreutils"
|
||||||
brew "moreutils"
|
brew "moreutils"
|
||||||
brew "findutils"
|
brew "findutils"
|
||||||
|
brew "gnutls"
|
||||||
brew "gnu-indent"
|
brew "gnu-indent"
|
||||||
brew "gnu-sed", args: ["with-default-names"]
|
brew "gnu-sed"
|
||||||
brew "gnu-tar"
|
brew "gnu-tar"
|
||||||
|
brew "gnu-indent"
|
||||||
|
brew "gnu-which"
|
||||||
|
|
||||||
# wget with IRI support
|
# wget with IRI support
|
||||||
brew "wget", args: ["with-iri"]
|
brew "wget", args: ["with-iri"]
|
||||||
@@ -57,6 +60,7 @@ brew "gnupg"
|
|||||||
brew "vim" #, args: ["with-override-system-vi"]
|
brew "vim" #, args: ["with-override-system-vi"]
|
||||||
brew "gcc"
|
brew "gcc"
|
||||||
brew "grep"
|
brew "grep"
|
||||||
|
brew "make"
|
||||||
brew "openssh"
|
brew "openssh"
|
||||||
brew "screen"
|
brew "screen"
|
||||||
brew "gmp"
|
brew "gmp"
|
||||||
@@ -66,9 +70,12 @@ brew "ack"
|
|||||||
brew "gs"
|
brew "gs"
|
||||||
brew "imagemagick", args: ["with-webp"]
|
brew "imagemagick", args: ["with-webp"]
|
||||||
brew "ffmpeg", args: ["with-libvpx"]
|
brew "ffmpeg", args: ["with-libvpx"]
|
||||||
|
brew "gawk"
|
||||||
|
brew "less"
|
||||||
brew "lua"
|
brew "lua"
|
||||||
brew "lynx"
|
brew "lynx"
|
||||||
brew "mtr"
|
brew "mtr"
|
||||||
|
brew "nano"
|
||||||
brew "p7zip"
|
brew "p7zip"
|
||||||
brew "pigz"
|
brew "pigz"
|
||||||
brew "pv"
|
brew "pv"
|
||||||
@@ -128,6 +135,7 @@ brew "jq"
|
|||||||
brew "kubernetes-cli"
|
brew "kubernetes-cli"
|
||||||
brew "kubernetes-helm"
|
brew "kubernetes-helm"
|
||||||
brew "libsass", args: ["HEAD"]
|
brew "libsass", args: ["HEAD"]
|
||||||
|
brew "mas"
|
||||||
brew "mcrypt"
|
brew "mcrypt"
|
||||||
brew "mhash"
|
brew "mhash"
|
||||||
brew "mkcert"
|
brew "mkcert"
|
||||||
@@ -272,9 +280,9 @@ cask "github"
|
|||||||
cask "glyphs"
|
cask "glyphs"
|
||||||
cask "google-cloud-sdk"
|
cask "google-cloud-sdk"
|
||||||
cask "imageoptim"
|
cask "imageoptim"
|
||||||
cask "intellij-idea"
|
|
||||||
cask "iterm2"
|
cask "iterm2"
|
||||||
cask "java8"
|
cask "java8"
|
||||||
|
cask "jetbrains-toolbox"
|
||||||
cask "multipass"
|
cask "multipass"
|
||||||
cask "ngrok"
|
cask "ngrok"
|
||||||
cask "postman"
|
cask "postman"
|
||||||
|
|||||||
@@ -13,6 +13,17 @@ alias ...="cd ../.."
|
|||||||
alias ....="cd ../../.."
|
alias ....="cd ../../.."
|
||||||
alias ~="cd ~"
|
alias ~="cd ~"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Remap macOS core utils to GNU
|
||||||
|
#
|
||||||
|
alias sed="gsed"
|
||||||
|
alias grep="ggrep"
|
||||||
|
alias find="gfind"
|
||||||
|
alias make="gmake"
|
||||||
|
alias tar="gtar"
|
||||||
|
alias which="gwhich"
|
||||||
|
alias awk="gawk"
|
||||||
|
|
||||||
# My own creation! See: https://github.com/jakejarvis/simpip
|
# My own creation! See: https://github.com/jakejarvis/simpip
|
||||||
alias ipv4="curl -4 simpip.com --max-time 1 --proto-default https --silent"
|
alias ipv4="curl -4 simpip.com --max-time 1 --proto-default https --silent"
|
||||||
alias ipv6="curl -6 simpip.com --max-time 1 --proto-default https --silent"
|
alias ipv6="curl -6 simpip.com --max-time 1 --proto-default https --silent"
|
||||||
@@ -25,14 +36,14 @@ alias dns-check="networksetup -getdnsservers Wi-Fi"
|
|||||||
alias dns-set="networksetup -setdnsservers Wi-Fi "
|
alias dns-set="networksetup -setdnsservers Wi-Fi "
|
||||||
alias dns-set-cloudflare="dns-set 1.1.1.1 1.0.0.1"
|
alias dns-set-cloudflare="dns-set 1.1.1.1 1.0.0.1"
|
||||||
alias dns-set-google="dns-set 8.8.8.8 8.8.4.4"
|
alias dns-set-google="dns-set 8.8.8.8 8.8.4.4"
|
||||||
|
|
||||||
alias flush="sudo killall -HUP mDNSResponder; sudo killall mDNSResponderHelper; sudo dscacheutil -flushcache"
|
alias flush="sudo killall -HUP mDNSResponder; sudo killall mDNSResponderHelper; sudo dscacheutil -flushcache"
|
||||||
|
|
||||||
alias hosts="sudo $EDITOR /etc/hosts"
|
alias hosts="sudo $EDITOR /etc/hosts"
|
||||||
alias speed="wget -O /dev/null http://cachefly.cachefly.net/100mb.test"
|
alias speed="wget -O /dev/null http://cachefly.cachefly.net/100mb.test"
|
||||||
alias digg="dig @8.8.8.8 +nocmd any +multiline +noall +answer"
|
alias digg="dig @8.8.8.8 +nocmd any +multiline +noall +answer"
|
||||||
|
|
||||||
# Update: brew, npm, gem, macos
|
# Update: brew, npm, gem, app store, macos
|
||||||
alias update="brew update; brew upgrade; brew cask upgrade; brew cleanup; npm install npm -g; npm update -g; gem update --system; gem update; gem cleanup; sudo gem update --system; sudo gem update; sudo gem cleanup; sudo softwareupdate -ia --include-config-data;"
|
alias update="brew update; brew upgrade; brew cask upgrade; brew cleanup; npm install npm -g; npm update -g; gem update --system; gem update; gem cleanup; sudo gem update --system; sudo gem update; sudo gem cleanup; mas upgrade; sudo softwareupdate -ia --include-config-data;"
|
||||||
|
|
||||||
alias rehide="defaults write com.apple.finder AppleShowAllFiles -bool false && killall Finder"
|
alias rehide="defaults write com.apple.finder AppleShowAllFiles -bool false && killall Finder"
|
||||||
alias unhide="defaults write com.apple.finder AppleShowAllFiles -bool true && killall Finder"
|
alias unhide="defaults write com.apple.finder AppleShowAllFiles -bool true && killall Finder"
|
||||||
@@ -40,7 +51,7 @@ alias forcetrash="sudo rm -rf ~/.Trash /Volumes/*/.Trashes"
|
|||||||
alias unq="sudo xattr -rd com.apple.quarantine"
|
alias unq="sudo xattr -rd com.apple.quarantine"
|
||||||
alias afk="/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend"
|
alias afk="/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend"
|
||||||
|
|
||||||
alias displays="system_profiler SPDisplaysDataType"
|
alias gpu="system_profiler SPDisplaysDataType"
|
||||||
alias cpu="sysctl -n machdep.cpu.brand_string"
|
alias cpu="sysctl -n machdep.cpu.brand_string"
|
||||||
alias screenfetch="neofetch"
|
alias screenfetch="neofetch"
|
||||||
|
|
||||||
@@ -48,17 +59,21 @@ alias ripfinder="sudo killall Finder"
|
|||||||
alias ripdock="sudo killall Dock"
|
alias ripdock="sudo killall Dock"
|
||||||
alias ripmenu="sudo killall SystemUIServer NotificationCenter"
|
alias ripmenu="sudo killall SystemUIServer NotificationCenter"
|
||||||
|
|
||||||
alias finder="open -a Finder ./"
|
# open current directory in Finder
|
||||||
|
alias opdir="open -a Finder ./"
|
||||||
|
|
||||||
# use VS Code insiders build
|
# use VS Code insiders build
|
||||||
#alias code="code-insiders"
|
# alias code="code-insiders"
|
||||||
alias vs="code ./"
|
alias vs="code ./"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Git
|
||||||
|
#
|
||||||
# required: https://github.com/github/hub
|
# required: https://github.com/github/hub
|
||||||
# `brew install hub`
|
# `brew install hub`
|
||||||
|
#
|
||||||
alias git="hub"
|
alias git="hub"
|
||||||
alias g="hub"
|
alias g="hub"
|
||||||
|
|
||||||
alias gc="git commit -m" # + commit message
|
alias gc="git commit -m" # + commit message
|
||||||
alias gca="git add . && git commit -m" # + commit message
|
alias gca="git add . && git commit -m" # + commit message
|
||||||
alias gs="git status -sb"
|
alias gs="git status -sb"
|
||||||
@@ -83,11 +98,33 @@ alias ghnew="gh repo create"
|
|||||||
alias ghfork="gh repo fork"
|
alias ghfork="gh repo fork"
|
||||||
alias ghci="hub ci-status --verbose"
|
alias ghci="hub ci-status --verbose"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Docker
|
||||||
|
#
|
||||||
|
alias d="docker"
|
||||||
|
alias dit="docker run -it"
|
||||||
|
alias dps="docker ps -a"
|
||||||
|
dsh() {
|
||||||
|
docker exec -ti "$1" /bin/sh
|
||||||
|
}
|
||||||
|
dhub() {
|
||||||
|
# search docker hub by tag
|
||||||
|
curl -sS "https://registry.hub.docker.com/v2/repositories/$1/tags/" | jq '."results"[]["name"]' | sort
|
||||||
|
}
|
||||||
alias dc="docker-compose"
|
alias dc="docker-compose"
|
||||||
alias dcu="docker-compose up -d"
|
alias dcu="docker-compose up -d"
|
||||||
alias dcd="docker-compose down"
|
alias dcd="docker-compose down"
|
||||||
alias dcr="docker-compose down && docker-compose up -d"
|
alias dcr="docker-compose down && docker-compose up -d"
|
||||||
alias dcl="docker-compose logs -f"
|
alias dcl="docker-compose logs -f"
|
||||||
|
alias docker-clean-containers='docker ps --filter "status=exited" -a -q | xargs docker rm -v'
|
||||||
|
alias docker-clean-images='docker images --filter "dangling=true" -q | xargs docker rmi'
|
||||||
|
alias docker-clean-volumes='docker volume ls --filter dangling=true | xargs docker volume rm'
|
||||||
|
|
||||||
|
#
|
||||||
|
# Node
|
||||||
|
#
|
||||||
|
alias npm-reset="rm -rf node_modules && npm cache clean && npm install"
|
||||||
|
alias yarn-reset="rm -rf node_modules && yarn cache clean && yarn install"
|
||||||
|
|
||||||
alias sshalt="ssh -p 2222"
|
alias sshalt="ssh -p 2222"
|
||||||
alias moshalt="mosh --ssh=\"ssh -p 2222\""
|
alias moshalt="mosh --ssh=\"ssh -p 2222\""
|
||||||
@@ -95,7 +132,8 @@ alias moshalt="mosh --ssh=\"ssh -p 2222\""
|
|||||||
alias ios="open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app"
|
alias ios="open /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app"
|
||||||
alias watchos="open /Applications/Xcode.app/Contents/Developer/Applications/Simulator\ \(Watch\).app"
|
alias watchos="open /Applications/Xcode.app/Contents/Developer/Applications/Simulator\ \(Watch\).app"
|
||||||
|
|
||||||
alias pubkey="more ~/.ssh/id_rsa.pub | pbcopy | echo '=> Public key copied to clipboard.'"
|
alias pubkey="more ~/.ssh/id_ed25519.pub | pbcopy | echo '=> Public key copied to clipboard.'"
|
||||||
|
alias pubkey_rsa="more ~/.ssh/id_rsa.pub | pbcopy | echo '=> Public key copied to clipboard.'"
|
||||||
|
|
||||||
alias ytdl="youtube-dl -f bestvideo+bestaudio"
|
alias ytdl="youtube-dl -f bestvideo+bestaudio"
|
||||||
alias ytmp3="youtube-dl -f bestaudio -x --audio-format mp3 --audio-quality 320K"
|
alias ytmp3="youtube-dl -f bestaudio -x --audio-format mp3 --audio-quality 320K"
|
||||||
|
|||||||
@@ -13,11 +13,6 @@ serve() {
|
|||||||
python -c $'import SimpleHTTPServer;\nmap = SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map;\nmap[""] = "text/plain";\nfor key, value in map.items():\n\tmap[key] = value + ";charset=UTF-8";\nSimpleHTTPServer.test();' "$port"
|
python -c $'import SimpleHTTPServer;\nmap = SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map;\nmap[""] = "text/plain";\nfor key, value in map.items():\n\tmap[key] = value + ";charset=UTF-8";\nSimpleHTTPServer.test();' "$port"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Start a bash shell inside of a running Docker container
|
|
||||||
docker-bash() {
|
|
||||||
docker exec -ti $1 /bin/bash
|
|
||||||
}
|
|
||||||
|
|
||||||
# Extract a compressed archive without worrying about which tool to use
|
# Extract a compressed archive without worrying about which tool to use
|
||||||
extract() {
|
extract() {
|
||||||
if [ -f $1 ]; then
|
if [ -f $1 ]; then
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ export PATH="$HOME/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/b
|
|||||||
# Go
|
# Go
|
||||||
export GOPATH="$HOME/golang"
|
export GOPATH="$HOME/golang"
|
||||||
export GOROOT="/usr/local/opt/go/libexec"
|
export GOROOT="/usr/local/opt/go/libexec"
|
||||||
export PATH="$PATH:$GOPATH/bin"
|
export PATH="$GOPATH/bin:$PATH"
|
||||||
export PATH="$PATH:$GOROOT/bin"
|
export PATH="$GOROOT/bin:$PATH"
|
||||||
|
|
||||||
# Ruby
|
# Ruby
|
||||||
export RUBY_HOME=/usr/local/opt/ruby/bin
|
export RUBY_HOME=/usr/local/opt/ruby/bin
|
||||||
|
|||||||
Reference in New Issue
Block a user