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
expose: | |
# Set how to expose the service. Set the type as "ingress", "clusterIP", "nodePort" or "loadBalancer" | |
# and fill the information in the corresponding section | |
type: ingress | |
tls: | |
# Enable TLS or not. | |
# Delete the "ssl-redirect" annotations in "expose.ingress.annotations" when TLS is disabled and "expose.type" is "ingress" | |
# Note: if the "expose.type" is "ingress" and TLS is disabled, | |
# the port must be included in the command when pulling/pushing images. | |
# Refer to https://github.com/goharbor/harbor/issues/5291 for details. |
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 | |
################################################################################ | |
# Script: deploy-cluster.sh | |
# Description: | |
# Deploys a complete HPC cluster with: | |
# - Control node: LDAP, NFS, SLURM controller, slurmrestd | |
# - Compute node: SLURM compute | |
# - Login node: User access point | |
# Including: |
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 | |
# SSL证书工具箱 | |
# 版本: 1.0.0 | |
# 功能: 生成根证书、中间证书、多域名证书、IP证书等 | |
################### | |
# 全局配置 | |
################### |
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
#!/usr/bin/env python3 | |
import sys | |
import shutil | |
import argparse | |
import textwrap | |
from typing import List, Tuple, Dict | |
def get_terminal_size() -> Tuple[int, int]: | |
"""Get terminal size, fallback to default if not available""" | |
try: |
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
wget https://cursor.blob.core.windows.net/remote-releases/297991d169fa3a11975c5aa95adc69be73250c70/cli-linux-arm64.tar.gz |
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 | |
# Attempt to guess a canonical system name. | |
# Copyright 1992-2024 Free Software Foundation, Inc. | |
# shellcheck disable=SC2006,SC2268 # see below for rationale | |
timestamp='2024-07-27' | |
# This file is free software; you can redistribute it and/or modify it | |
# under the terms of the GNU General Public License as published by |
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
//============================================================== | |
// Copyright © 2020 Intel Corporation | |
// | |
// SPDX-License-Identifier: MIT | |
// ============================================================= | |
/** | |
* Matrix_mul multiplies two large matrices both the CPU and the offload device, | |
* then compares results. If the code executes on both CPU and the offload | |
* device, the name of the offload device and a success message are displayed. |
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
wget https://github.com/gitpod-io/openvscode-server/releases/download/openvscode-server-v1.89.1/openvscode-server-v1.89.1-linux-arm64.tar.gz | |
tar -xvf openvscode-server-v1.89.1-linux-arm64.tar.gz | |
./openvscode-server-v1.89.1-linux-arm64/bin/openvscode-server | |
ssh -NfL 3000:localhost:3000 `whomi`@<ip address> | |
# open localhost:3000 in your browser |
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
lscpu | grep crc32 | |
sudo apt install -y libzstd1 build-essential git binutils | |
objdump -d /usr/lib/aarch64-linux-gnu/libz.so.1 | awk -F" " '{print $3}' | grep crc32 | wc -l | |
mkdir tmp ; pushd tmp | |
git clone https://github.com/cloudflare/zlib.git | |
cd zlib && ./configure --prefix=$HOME/opt/apps/tools/zlib | |
make && make install | |
popd |
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
# Asks the user a yes/no question and waits for a response. Takes the question | |
# text as its only argument. The user must enter either "y" or "n" to proceed. | |
confirm() | |
{ | |
while true; do | |
read -r -p "$1" RESPONSE | |
case "$RESPONSE" in | |
[yY]) return 0 ;; | |
[nN]) return 1 ;; | |
*) echo "Please enter y or n" |
NewerOlder