A powerline-style two-line status bar for Claude Code that shows model, git branch, directory, effort level, cost, session duration, context usage, token counts, and rate limits — all at a glance.
Line 1: ❯ ❯ 5h:%
A powerline-style two-line status bar for Claude Code that shows model, git branch, directory, effort level, cost, session duration, context usage, token counts, and rate limits — all at a glance.
Line 1: ❯ ❯ 5h:%
| format = """ | |
| $username\ | |
| @\ | |
| $hostname\ | |
| $directory\ | |
| ${custom.git_current_branch}\ | |
| $git_branch\ | |
| $git_state\ | |
| $git_status\ | |
| $aws\ |
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| # Script to assist with disabling DNSSEC signing | |
| # Usage: | |
| # DOMAIN=sparta.kyxap.pro ./$0 | |
| type -P dig shuf 2>&1 >/dev/null | |
| DOMAIN="${DOMAIN}." |
| #!/usr/bin/env bash | |
| # generate selinux policies for ecs containers with udica on amazon linux | |
| #requirements: xargs, jq, udica | |
| jq='(.[].HostConfig | select(.Devices == null) | .Devices) |= []' | |
| jq="jq '${jq}' > %s" | |
| docker='{{slice .ID 0 12}} {{slice .Name 1}} {{.State.Pid}}' | |
| audit='ausearch -m avc,user_avc,selinux_err,user_selinux_err --input-logs --raw -w -su %s > %s.avc' | |
| #audit='ausearch -m avc,user_avc,selinux_err,user_selinux_err --input-logs --raw -w -su %s | audit2allow -M %s' |
| # LS_COLORS | |
| # Maintainers: Magnus Woldrich <m@japh.se>, | |
| # Ryan Delaney <ryan.delaney@gmail.com> OpenGPG: 0D98863B4E1D07B6 | |
| # URL: https://github.com/trapd00r/LS_COLORS | |
| # Version: 0.254 | |
| # Updated: Tue Mar 29 21:25:30 AEST 2016 | |
| # | |
| # This is a collection of extension:color mappings, suitable to use as your | |
| # LS_COLORS environment variable. Most of them use the extended color map, | |
| # described in the ECMA-48 document; in other words, you'll need a terminal |
| # sync history | |
| history -a | |
| history -w | |
| # when leaving the console clear the screen to increase privacy | |
| if [ "$SHLVL" = 1 ]; then | |
| [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q | |
| fi |
| ```nginx | |
| http { | |
| ... | |
| log_format main '$remote_addr - $remote_user [$time_local] $status ' | |
| '"$request" $body_bytes_sent "$http_referer" ' | |
| '"$http_user_agent" "$http_x_forwarded_for" "$http_x_fasten_backend" "$ssl_client_s_dn"'; | |
| log_format upstream_log '$remote_addr - $remote_user [$time_local] ' | |
| '"$request" $status $body_bytes_sent ' | |
| '"$http_referer" "$http_user_agent"' |
| nssm install Jenkins "%COMMONPROGRAMFILES(x86)%\Oracle\Java\javapath\java.exe" | |
| nssm set Jenkins AppParameters -jar agent.jar -jnlpUrl https://<jenksins-server-url>/computer/<jenkins-worker-node>/slave-agent.jnlp -secret <worker-secret> -workDir "C:\jenkins\" | |
| nssm set Jenkins AppDirectory C:\Jenkins | |
| nssm set Jenkins AppStdout C:\Jenkins\jenkins.log | |
| nssm set Jenkins AppStderr C:\Jenkins\jenkins.log | |
| nssm set Jenkins AppStopMethodSkip 6 | |
| nssm set Jenkins AppStopMethodConsole 1000 | |
| nssm set Jenkins AppThrottle 5000 | |
| nssm start Jenkins |
Все beats используют библиотеку libbeat, в которой есть механизм autodiscover для различных провайдеров.
Бит подключается к сокету докера и ждет событий create, delete от контейнеров.
Для каждого из событий он вычитывает описание контейнера и формирует набор значений,
которые можно использовать для динамического темплейтинга в конфигурационном файле.
host
| #!/bin/sh | |
| ACTION=${1} | |
| DEBUG=1 | |
| func_res() { | |
| [[ ${DEBUG:-0} -ge 1 ]] && set 2>&1 | logger -t vpnc-script | |
| # how to get cidrs: http://kyxap.org.ua/articles/google_ip_range | |
| CIDRS="$(cat /opt/home/admin/cidrs/*.txt)" | |
| EXCLUDE="$(cat /opt/home/admin/cidrs/exclude/*.txt)" |