Bash stuff
This commit is contained in:
parent
3662587892
commit
ea03ebc291
|
@ -1,7 +1,9 @@
|
|||
# General
|
||||
|
||||
alias ll="ls -lAFh"
|
||||
alias subl="/Applications/Sublime\ Text\ 3.app/Contents/SharedSupport/bin/subl"
|
||||
alias subl="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"
|
||||
alias sub="subl ."
|
||||
alias sdot="subl ~/Dotfiles"
|
||||
|
||||
# Git
|
||||
alias git="git-achievements"
|
||||
|
@ -16,7 +18,7 @@ alias gp="git push"
|
|||
alias gs="git status -sb"
|
||||
alias gu="git up"
|
||||
alias gcl="git co -"
|
||||
alias gml="git merge -"
|
||||
alias gml="git merge - --no-edit"
|
||||
|
||||
# Ruby
|
||||
alias bd="bundle install --jobs=8 --path vendor/bundle"
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
# Enable debug
|
||||
# set -xv
|
||||
|
||||
export TERM=xterm-256color
|
||||
export EDITOR=vim
|
||||
|
||||
|
@ -9,10 +12,11 @@ export EDITOR=vim
|
|||
export PROJECTS=$HOME/Code
|
||||
|
||||
# Go
|
||||
export GOROOT=$PROJECTS/go
|
||||
export GOPATH=$HOME/go
|
||||
export GOROOT=/usr/local/golang
|
||||
export GOPATH=/usr/local/gopath
|
||||
export CGO_ENABLED=0
|
||||
|
||||
export SSL_CERT_FILE="/usr/local/opt/curl-ca-bundle/share/ca-bundle.crt"
|
||||
# Bash stuff
|
||||
|
||||
function __bash_import { source $HOME/.bash/$1.bash; }
|
||||
__bash_import "functions_internal"
|
||||
|
@ -36,6 +40,4 @@ fi
|
|||
# Misc
|
||||
#
|
||||
|
||||
# . $HOME/.config/on_reboot.sh
|
||||
|
||||
test -e "${HOME}/.iterm2_shell_integration.bash" && source "${HOME}/.iterm2_shell_integration.bash"
|
||||
# export SSL_CERT_FILE="/usr/local/opt/curl-ca-bundle/share/ca-bundle.crt"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
function __bash_basedir {
|
||||
local full=$(pwd)
|
||||
if [ $full == "/" ]
|
||||
if [ "$full" == "/" ]
|
||||
then
|
||||
echo $full
|
||||
else
|
||||
|
@ -13,5 +13,10 @@ function __bash_escape {
|
|||
}
|
||||
|
||||
function __bash_is_empty {
|
||||
if [ "$1" == "" ]; then return 0; else return 1; fi
|
||||
if [ "$1" == "" ]
|
||||
then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
shopt -s histappend # Append history instead of rewriting it
|
||||
shopt -s cmdhist # Use one command per line
|
||||
HISTCONTROL=ignoreboth # Don’t store specific lines
|
||||
HISTCONTROL=ignoreboth # Don’t store specific lines (ignoredups + ignorespace)
|
||||
HISTTIMEFORMAT='%F %T ' # Record timestamps
|
||||
HISTFILESIZE=1000000 # Allow a larger history file
|
||||
HISTSIZE=1000000 # Allow a longer history
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
export PATH=/usr/local/bin:$PATH # Homebrew tools
|
||||
export PATH=$PATH:/usr/local/sbin # Homebrew apps
|
||||
export PATH=$PATH:$HOME/.dotfiles/bin # My stuff
|
||||
export PATH=$PATH:$HOME/Dotfiles/bin # My stuff
|
||||
|
||||
# NodeJS
|
||||
# export PATH=$PATH:/usr/local/share/npm/bin
|
||||
|
||||
# Ruby
|
||||
export PATH=$PATH:$HOME/.rbenv/plugins/ruby-build/bin # rbenv plugins
|
||||
export PATH=$HOME/.rbenv/versions/2.4.0/bin:$PATH # Gem binaries
|
||||
export PATH=$HOME/.rbenv/shims:$PATH # Gem binaries
|
||||
|
||||
# git achievements
|
||||
export PATH=$PATH:$HOME/.misc/git-achievements
|
||||
export PATH=$PATH:$PROJECTS/git-achievements
|
||||
|
||||
# Go
|
||||
export PATH=$PATH:$GOROOT/bin # Go runtime binaries
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
cat <<EOF
|
||||
* * * * * Command
|
||||
| | | | |
|
||||
| | | | +- Day of the week (0-6)
|
||||
| | | +--- Month of the Year (1-12)
|
||||
| | +----- Day of the month (1-31)
|
||||
| +------- Hour (0-23)
|
||||
+--------- Minute (0-59)
|
||||
EOF
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
sudo ifconfig en0 down
|
||||
sudo route flush
|
||||
sudo ifconfig en0 up
|
Loading…
Reference in New Issue