Skip to content

Commit

Permalink
Add alias for explore k8s API
Browse files Browse the repository at this point in the history
  • Loading branch information
falconluca committed Apr 16, 2022
1 parent 195922f commit 5c37fe6
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
7 changes: 7 additions & 0 deletions .alias_k8s
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,10 @@ alias kpf='kubectl port-forward' # kpf fortune 8080:80

# alpine镜像默认的软件仓库在国外, 有时 `docker build` 的时候安装软件包会很慢, 可以改用国内的软件包镜像
alias alpine-ustc='RUN sed -i 's!http:https://dl-cdn.alpinelinux.org/!https://mirrors.ustc.edu.cn/!g' /etc/apk/repositories'

# Explore k8s API
alias kube1="kubectl get --raw / | jq ."
alias kube2="kubectl get --raw /api | jq ."
alias kube3="kubectl get --raw /api/v1 | jq ."
alias kube4="kubectl get --raw /api/v1/pods | jq ."
alias kube4="kubectl get --raw /apis/apps/v1/deployments | jq ."
16 changes: 13 additions & 3 deletions .serv
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
function chrome() {
open -a "Google Chrome" $1
}
export -f chrome

function firefox() {
open -a "firefox" $1
}
export -f firefox

export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_321.jdk/Contents/Home"
export HBASE_HOME=""

Expand All @@ -7,10 +17,10 @@ hbase-dashboard='firefox 127.0.0.1:16010'

# RabbitMQ
# https://codeburst.io/get-started-with-rabbitmq-on-docker-4428d7f6e46b
rabbitmq-dashboard='firefox localhost:15672'
rabbitmq-dashboard='firefox http:https://127.0.0.1:15672'

# Kibana
kibana-dashboard='firefox localhost:5601'
kibana-dashboard='firefox http:https://127.0.0.1:5601'


# MySQL
Expand All @@ -25,4 +35,4 @@ alias damqp="docker run --rm -d --hostname my-rabbit -p 15672:15672 -p 5672:5672
alias dkakfa=""
alias des=""

alias dlogstash='sudo ./Users/cds-dn378/bin/logstash-7.1.0/bin/logstash -f logstash.conf'
alias dlogstash='sudo ~/bin/logstash-7.1.0/bin/logstash -f logstash.conf'
2 changes: 0 additions & 2 deletions hammerspoon/.hammerspoon/init.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
-- https://www.hammerspoon.org/

-- 使用【Option+1】在不同屏幕之间移动鼠标
hs.hotkey.bind({'option'}, '1', function()
local screen = hs.mouse.getCurrentScreen()
local nextScreen = screen:next()
Expand All @@ -9,7 +8,6 @@ hs.hotkey.bind({'option'}, '1', function()
hs.mouse.absolutePosition(center)
end)

-- 使用【Option+2】在不同屏幕之间移动窗口
hs.hotkey.bind({'option'}, '2', function()
-- get the focused window
local win = hs.window.focusedWindow()
Expand Down

0 comments on commit 5c37fe6

Please sign in to comment.