-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzshalias
40 lines (38 loc) · 1.1 KB
/
zshalias
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
alias ls="ls --color"
alias ll="ls -Ahls"
alias bd="byobu-tmux detach"
mkcdir () {
mkdir "$@" && cd "${@[-1]}"
}
torcheck () {
curl -# https://check.torproject.org | grep "class=\"not\"" >/dev/null
if [[ $? -eq 0 ]]; then
echo "Tor is enabled in this shell."
else
echo "Tor is disabled in this shell."
fi
}
homestead () {
( cd ~/Homestead && vagrant $* )
}
minio () {
if [[ -z $1 ]]; then
echo "Please specify a directory for Minio data."
else
docker run -p 9000:9000 -v $(readlink -f $1):/data minio/minio server /data
fi
}
neo4j () {
if [[ -z $1 ]]; then
echo "Please specify a directory for Neo4j."
else
local dir=$(readlink -f $1)
mkdir -p $dir/conf && mkdir -p $dir/data && mkdir -p $dir/plugins && mkdir -p $dir/import
docker run --user=$(id -u):$(id -g) \
-p 7473:7473 -p 7474:7474 -p 7687:7687 \
-v $dir/conf:/conf -v $dir/data:/data -v $dir/plugins:/plugins -v $dir/import:/var/lib/neo4j/import \
--env NEO4J_AUTH=neo4j/test --env NEO4J_ACCEPT_LICENSE_AGREEMENT=yes --env NEO4JLABS_PLUGINS=\[\"apoc\"\] neo4j:community
fi
}
# source local alias file
source-safe ~/.zshalias.local