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/sh | |
| echo 'Unattended-Upgrade::Automatic-Reboot "true";' | sudo tee /etc/apt/apt.conf.d/99unattended-upgrades-custom |
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 | |
| # grpc_health.sh | |
| grpc_health() { | |
| local max_time | |
| local insecure=false | |
| local connect_only=false | |
| local args=() |
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 | |
| # json-to-assoc-array.sh: Convert a JSON object to a Bash associative array. | |
| json_object_to_bash_assoc_array_usage() { | |
| cat <<'EOF' | |
| Usage: | |
| json_object_to_bash_assoc_array [OPTIONS] JSON_OBJECT VAR_NAME | |
| Convert a JSON object to a Bash associative array. |
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
| # Examples: | |
| # [3, 5] | bitor -> 7 | |
| # [null, 3] | bitor -> 3 | |
| # [] | bitor -> null | |
| def bitor: | |
| map(select(. != null)) | unique | | |
| if length == 0 then null | |
| elif length == 1 then first | |
| elif any(. == -1) then -1 | |
| else (map(. % 2 | abs) | max) + 2 * (map(. / 2 | floor) | bitor) |
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
| on: | |
| push: | |
| jobs: | |
| test-github-actions-expressions-in-conditionals: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Note that in conditionals, falsy values (false, 0, -0, "", '', null) are coerced to false and truthy (true and other non-falsy values) are coerced to true. | |
| # See https://docs.github.com/en/actions/reference/workflows-and-actions/expressions#literals | |
| - run: "echo \"if: always() && 0 == false\"" |
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 -O https://www.kernel.org/pub/linux/bluetooth/bluez-5.55.tar.xz | |
| tar -xf bluez-5.55.tar.xz | |
| cd bluez-5.55 | |
| gcc tools/{bccmd,csr*,ubcsp}.c -o tools/bccmd -I. $(pkg-config --cflags --libs bluez) | |
| mkdir -p ~/bin | |
| cp tools/bccmd ~/bin/ |
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
| # Moved to https://github.com/giner/bash-libs/blob/main/read-vars.sh |
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 | |
| set -eu | |
| # Add Git info to Bash prompt | |
| bash_prompt_configuration=( | |
| 'PS1="${PS1%\\$ }\$(__git_ps1)\\$ "' | |
| 'GIT_PS1_SHOWDIRTYSTATE=1' | |
| ) |
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/sh | |
| # NOTE: This change won't persist if package xkb-data is reinstaled or updated | |
| sudo sed -i '/key <I208>/s/\bXF86AudioPlay\b/XF86AudioMicMute/' /usr/share/X11/xkb/symbols/inet |
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
| // How to test | |
| // | |
| // Update uriPrefix, keystoreFile, keystorePassword, truststoreFile, truststorePassword with your values and run: | |
| // curl -L -O https://repo1.maven.org/maven2/io/github/openfeign/feign-core/11.6/feign-core-11.6.jar | |
| // java -cp feign-core-11.6.jar HelloFeignmTLS.java | |
| // Feign | |
| import feign.Feign; | |
| import feign.RequestLine; |
NewerOlder