1
0
Fork 0

major re-org

pull/1260/head
Bin 8 years ago
parent 8dee9f0453
commit 2316c468d0

2
.gitignore vendored

@ -1,3 +1,5 @@
*.zwc *.zwc
*.zwc.old *.zwc.old
modules/*/cache.zsh modules/*/cache.zsh
appuri.env
redshift.env

@ -0,0 +1 @@
export AWS_DEFAULT_REGION=us-west-2

@ -0,0 +1,11 @@
# conflict with go's gb
unalias gb &>/dev/null
export GOROOT=/usr/local/go
export GOPATH=$MYSRC/gopath
# Set the list of directories that Zsh searches for programs.
path=(
$path
$GOPATH/bin
)

@ -0,0 +1 @@
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home

@ -0,0 +1,10 @@
source <(kubectl completion zsh)
function kube-pod-restart {
SVC_TOKILL=$1
NAMESPACE="${2-default}"
if [ "$SVC_TOKILL" = "" ]; then exit 1; fi
kubectl delete po --namespace $NAMESPACE $(kubectl get po --namespace $NAMESPACE | grep $SVC_TOKILL | awk '{print $1}' | tr '\n' ' ')
}

@ -0,0 +1,64 @@
export KAFKA09=$MYSW/kafka
function kafka-stop {
$KAFKA09/bin/zookeeper-server-stop.sh $KAFKA09/config/zookeeper.properties
sleep 3
$KAFKA09/bin/kafka-server-stop.sh $KAFKA09/config/server.properties
}
function kafka-start {
rm -rf /tmp/zookeeper /tmp/kafka-logs
$KAFKA09/bin/zookeeper-server-start.sh $KAFKA09/config/zookeeper.properties &
sleep 2
$KAFKA09/bin/kafka-server-start.sh $KAFKA09/config/server.properties &
sleep 1
}
function kafka-topic-produce-zombie-raw {
kafka-topic-produce _test_events-1ebef931-8f30-49c9-9681-c5b22f5382d3
}
function kafka-topic-produce-zombie-sch {
kafka-topic-produce _test_sch_events-1ebef931-8f30-49c9-9681-c5b22f5382d3
}
function kafka-topic-produce {
TOPIC="${1-}"
HOST="${2-localhost}"
PORT="${3-9092}"
if [ "$TOPIC" = "" ]; then exit 1; fi
$KAFKA09/bin/kafka-console-producer.sh --topic $TOPIC --broker-list $HOST:$PORT
}
function kafka-topic-consume-zombie-raw {
kafka-topic-consume _test_events-1ebef931-8f30-49c9-9681-c5b22f5382d3
}
function kafka-topic-consume-zombie-sch {
kafka-topic-consume _test_sch_events-1ebef931-8f30-49c9-9681-c5b22f5382d3
}
function kafka-topic-consume {
TOPIC="${1-}"
HOST="${2-localhost}"
PORT="${3-9092}"
if [ "$TOPIC" = "" ]; then exit 1; fi
$KAFKA09/bin/kafka-topics.sh --zookeeper $HOST:$PORT --describe --topic $TOPIC
}
function kafka-topic-create-zombie-raw {
kafka-topic-create _test_events-1ebef931-8f30-49c9-9681-c5b22f5382d3
}
function kafka-topic-create-zombie-sch {
kafka-topic-create _test_sch_events-1ebef931-8f30-49c9-9681-c5b22f5382d3
}
function kafka-topic-create {
TOPIC="${1-}"
HOST="${2-localhost}"
PORT="${3-2181}"
if [ "$TOPIC" = "" ]; then exit 1; fi
$KAFKA09/bin/kafka-topics.sh --create --zookeeper $HOST:$PORT --replication-factor 1 --partitions 1 --topic $TOPIC
}

@ -0,0 +1,3 @@
export NVM_DIR="$HOME/.nvm"
alias ejs='code -n ~/.eslintrc ~/.esformatter $MYTOOL/setup-js-lint-formatter.sh'

@ -17,8 +17,8 @@ fi
# Editors # Editors
# #
export EDITOR="code -n" export EDITOR="vi"
export VISUAL="code -n" export VISUAL="vim"
export PAGER='less' export PAGER='less'
# #
@ -29,24 +29,6 @@ if [[ -z "$LANG" ]]; then
export LANG='en_US.UTF-8' export LANG='en_US.UTF-8'
fi fi
#
# Others
#
export MYSRC=$HOME/src
export MYSW=$HOME/sw
export MYDEV=$HOME/dev
# AWS
export AWS_DEFAULT_REGION=us-west-2
# GO
export GOROOT=/usr/local/go
export GOPATH=$MYSRC/gopath
# java
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home
# #
# Paths # Paths
# #
@ -63,8 +45,6 @@ typeset -gU cdpath fpath mailpath path
path=( path=(
/usr/local/{bin,sbin} /usr/local/{bin,sbin}
$path $path
$GOPATH/bin
$MYDEV
) )
# #

@ -9,29 +9,23 @@ fi
unsetopt correct unsetopt correct
export PSQL_EDITOR="vi" export PSQL_EDITOR="vi"
export KAFKA09=$MYSW/kafka
export HADOOP_HOME=/usr/local/opt/hadoop/libexec
export HIVE_HOME=/usr/local/opt/hive/libexec
export HCAT_HOME=/usr/local/opt/hive/libexec/hcatalog
export HOMEBREW_CASK_OPTS=--caskroom=/opt/homebrew-cask/Caskroom export HOMEBREW_CASK_OPTS=--caskroom=/opt/homebrew-cask/Caskroom
# node export MYENV=$HOME/.myenv
export NVM_DIR="$HOME/.nvm" export MYSRC=$HOME/src
export MYSW=$HOME/sw
export MYTOOL=$HOME/tool
# alias
alias sz='source ~/.zshrc' alias sz='source ~/.zshrc'
alias ez='code -n ~/.zprezto/' alias ez='code -n ~/.zprezto/ '
alias ec='code -n $MYDEV' alias et='code -n $MYTOOL'
alias cdsrc='cd $MYSRC' source ${MYENV}/aws.env
alias cdsw='cd $MYSW' source ${MYENV}/go.env
alias cddev='cd $MYDEV' source ${MYENV}/nodejs.env
source ${MYENV}/java.env
alias cdapi='cd $MYSRC/api-server && nvm use' source ${MYENV}/appuri.env
unalias gb source ${MYENV}/redshift.env
source ${MYENV}/k8s.env
source $MYDEV/appuri.env source ${MYENV}/kafka.env
source $MYDEV/api-server.env source ${MYENV}/spark.env
source <(kubectl completion zsh)

@ -0,0 +1,11 @@
export HADOOP_HOME=/usr/local/opt/hadoop/libexec
export HIVE_HOME=/usr/local/opt/hive/libexec
export HCAT_HOME=/usr/local/opt/hive/libexec/hcatalog
function parquet-tools {
ARGS="$@"
if [ "$ARGS" = "" ]; then ARGS="--help"; fi
java -jar $MYSRC/parquet-mr/parquet-tools/target/parquet-tools-1.6.0rc4.jar $ARGS
}
Loading…
Cancel
Save