This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| echo 'public class X{public static void main(String[]a)throws Exception{System.out.println(java.net.InetAddress.getLocalHost().getCanonicalHostName());}}' > X.java \ | |
| && javac X.java && java X && rm X.java X.class |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mkdir -p xxx | |
| cd ./xxx | |
| git init -q | |
| git remote add origin git@aaa.zzz.com:yyy/xxx.git | |
| git fetch origin "${SHA}" | |
| git checkout -q FETCH_HEAD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export AWS_PROFILE=$(grep -B20 "${ACCOUNT_ID}" ~/.aws/config | \ | |
| grep "^\[" | tail -1 | tr -d "[]" | awk '{print $NF}') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -s https://xxx.yyy.com:18080/api/v1/applications/app-zzz-123/stages | \ | |
| jq '[ .[] | .executorCpuTime // 0 ] | add / 1e6' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash -eu | |
| set -o pipefail | |
| readonly USER_ID=0 | |
| list_packages() { | |
| local flags="${1:-}" | |
| local cmd=(adb shell cmd package list packages --user "${USER_ID}") | |
| [[ -n "${flags}" ]] && cmd+=("${flags}") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash -eu | |
| sudo fastfetch --logo none -s \ | |
| 'Separator:LocalIp:OS:Host:Kernel:Uptime:Separator:CPU:CPUUsage:Loadavg:Separator:Memory:Disk:Separator:Processes' | |
| printf "Docker Volumes: " | |
| sudo docker volume ls | wc -l | |
| echo | |
| sudo docker stats --no-stream --format \ |
OlderNewer