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 | |
| # Note on hybrid CPUs (P-cores/E-cores): | |
| # Linux /proc/cpuinfo reports only features common to ALL cores. | |
| # This script will correctly detect the lowest ISA level supported | |
| # across all core types, which matches glibc's behavior. | |
| get_x86_64_abi_version() { | |
| local FLAGS | |
| local DETECTED_LEVEL |
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
| import "github.com/mattn/go-isatty" | |
| func init() { | |
| if isatty.IsTerminal(os.Stdout.Fd()) { | |
| slog.SetDefault(slog.New(slog.NewJSONHandler(os.Stdout, nil))) | |
| } | |
| } |
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 | |
| shopt -s nullglob | |
| cd /sys/class/nvme | |
| for CTRL in *; do | |
| echo "removing ${CTRL}" | |
| echo 1 >"${CTRL}/device/remove" | |
| done |
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
| microsoft: 2018-07-31 | |
| https://social.technet.microsoft.com/wiki/contents/articles/31680.microsoft-trusted-root-certificate-program-updates.aspx#july18 | |
| https://gallery.technet.microsoft.com/Trusted-Root-Program-d17011b8/file/205887/1/Trusted%20Root%20Program%20Participants%20As%20of%20July%2031%202018.xlsx | |
| jdk7: 7u151 (2017-07-18) | |
| https://www.oracle.com/java/technologies/javase/7u151-relnotes.html#CERTS | |
| jdk8: 8u141 (2017-07-18) | |
| https://www.oracle.com/java/technologies/javase/8u141-relnotes.html#CERTS | |
| https://hg.openjdk.java.net/jdk8u/jdk8u-dev/jdk/file/c3057fb0470e/make/data/cacerts/letsencryptisrgx1 | |
| mozilla: | |
| NSS: 3.26 (2016-08-05) |
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
| @media -moz-pref("sidebar.verticalTabs") { | |
| :root { | |
| --tab-block-margin: 0 !important; | |
| --tab-min-height: 24px !important; | |
| } | |
| } | |
| #tabbrowser-tabs[orient="vertical"] { | |
| .tabbrowser-tab { | |
| padding-block: 0 !important; |
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 | |
| : "${FORKED:=}" | |
| if [ -z "${FORKED}" ]; then | |
| echo >&2 'mongod for initdb is going to shutdown' | |
| mongod --pidfilepath /tmp/docker-entrypoint-temp-mongod.pid --shutdown | |
| echo >&2 'replica set will be initialized later' | |
| FORKED=1 "${BASH_SOURCE[0]}" & | |
| unset FORKED | |
| mongodHackedArgs=(:) # bypass mongod --shutdown in docker-entrypoint.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 | |
| echo -n 'Size: ' | |
| if [[ $OSTYPE == darwin* ]]; then | |
| stat -f %z "$1" | |
| else | |
| stat -c %s "$1" | |
| fi | |
| (tee < "$1" > /dev/null \ |
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 | |
| not_available() { echo -- "$1 is not available"; exit 1; } | |
| unknown_arch() { echo -- "unknown architecture"; exit 1; } | |
| ensure_command_available() { which -- "$1" >/dev/null && return; not_available "$1"; } | |
| ensure_gnu_tar() { tar --version | grep -F 'GNU tar' >/dev/null || not_available 'GNU tar'; } | |
| ensure_command_available curl | |
| ensure_command_available jq | |
| ensure_gnu_tar |
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 -euo pipefail | |
| : $CLUSTER_ID | |
| : ${PRIVATE:=false} # auto use private IP if public IP not available | |
| : ${MINUTES:=60} # defaults to 1 hour | |
| : ${SHOW_CLUSTER:=} | |
| : ${REGION_ID:=cn-shanghai} # choose nearest region as OpenAPI endpoint, don't need to match ACK cluster location | |
| echo >&2 '+ aliyun cs DescribeClusterUserKubeconfig' |
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 /etc/rc.common | |
| START=90 | |
| STOP=01 | |
| USE_PROCD=1 | |
| start_service() { | |
| procd_open_instance | |
| procd_set_param command /bin/sh -c 'while :; do read < /sys/kernel/debug/ieee80211/phy1/mt76/tx_hang_reset; [ "$REPLY" -eq 0 ] || break; sleep 5; done; reboot' | |
| procd_close_instance |
NewerOlder