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
| <?xml version="1.0" encoding="utf-8"?> | |
| <resources> | |
| <string-array name="twinapps_required_apps"> | |
| <item>com.android.vending</item> | |
| <item>com.google.android.gms</item> | |
| <item>jp.naver.line.android|Line: Free Calls & Messages</item> | |
| <item>com.facebook.katana|Facebook</item> | |
| <item>com.facebook.orca|Messenger - Text and Video Chat for Free</item> | |
| <item>com.tencent.mm|WeChat</item> | |
| <item>com.whatsapp|WhatsApp Messenger</item> |
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
| package hardwaresort | |
| import chisel3._ | |
| import chisel3.experimental.FixedPoint | |
| import chisel3.internal.firrtl.KnownBinaryPoint | |
| import chisel3.iotesters.PeekPokeTester | |
| import chisel3.util.log2Ceil | |
| //scalastyle:off magic.number | |
| /** |
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/zsh | |
| # | |
| # Function: Removes duplicate, colon-separated entries from a specified | |
| # environment variable. | |
| # Usage: dedup_env_var <VARIABLE_NAME> | |
| # Example: dedup_env_var PATH | |
| # | |
| dedup_env_var () { | |
| # Store the first argument (the environment variable's name) in a local variable. |
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 bash | |
| # bsubrepeater with audit log: re-submit LSF job when it disappears | |
| set -Eeuo pipefail | |
| DEFAULT_MAX=100000 | |
| DEFAULT_INTERVAL=10 | |
| VERBOSE=0 | |
| LOG_FILE="${BSUBREPEATER_LOG_FILE:-$HOME/.bsubrepeater.log}" | |
| usage() { |
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
| # Requires -Version 5.1 | |
| param([switch]$VerboseLog) | |
| if ([Threading.Thread]::CurrentThread.ApartmentState -ne 'STA') { | |
| Start-Process powershell "-NoLogo -Sta -ExecutionPolicy Bypass -File `"$PSCommandPath`" $(if($VerboseLog){'-VerboseLog'})" | |
| return | |
| } | |
| Add-Type -AssemblyName PresentationCore, PresentationFramework, WindowsBase |
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 bash | |
| set -euo pipefail | |
| OUT="/tmp/sys_snapshot_$(hostname)_$(date +%F_%H%M%S).log" | |
| { | |
| echo "===== META ====="; date; hostnamectl || true; echo; uptime | |
| echo; echo "===== CPU & MEM ====="; lscpu | egrep 'CPU|Thread|Model|NUMA' || lscpu; echo; free -m | |
| echo; echo "===== LOAD / RUNQ (vmstat 1x10) ====="; vmstat 1 10 | |
| echo; echo "===== DISK I/O (iostat -xz 1x10) ====="; iostat -xz 1 10 | |
| echo; echo "===== TOP PROCS (CPU) ====="; ps -eo pid,ppid,comm,%cpu,%mem,stat --sort=-%cpu | head -n 30 | |
| echo; echo "===== PID I/O/CTX (pidstat -urd 1x5) ====="; pidstat -urd 1 5 || true |
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
| // pragma translate_off | |
| // Checker module: verifies that when pinmux select is high, any X value | |
| // from the module output must propagate to the corresponding GPIO within | |
| // a given cycle latency window. Otherwise, it triggers a fatal error. | |
| module pinmux_x_path_checker #( | |
| parameter int MIN_LAT = 1, // Minimum cycle delay allowed | |
| parameter int MAX_LAT = 8, // Maximum cycle delay allowed | |
| parameter int WIDTH = 1 // Data width (1 = single bit) | |
| )( | |
| input logic clk, |
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 bash | |
| # nfs-mountstats-lite.sh -- user-space NFS health snapshot | |
| # 用法:./nfs-mountstats-lite.sh [-i interval_sec] [-c samples] | |
| # 預設 interval=2, samples=3(總觀察 ~4 秒) | |
| set -euo pipefail | |
| INT=2; CNT=3 | |
| while getopts "i:c:" o; do | |
| case "$o" in | |
| i) INT="$OPTARG";; |
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 bash | |
| # nfs-watch.sh -- user-mode NFS watch panel (no sudo) | |
| INT=${1:-2} # 重新整理秒數,預設 2s | |
| have_nfsiostat=0 | |
| command -v nfsiostat >/dev/null 2>&1 && have_nfsiostat=1 | |
| while true; do | |
| clear | |
| echo "NFS Watch | host=$(hostname) time=$(date '+%F %T') refresh=${INT}s" |