Skip to content

Instantly share code, notes, and snippets.

View githubhjs's full-sized avatar
🎯
Focusing

Chih-Hsueh "Josh" Huang githubhjs

🎯
Focusing
View GitHub Profile
@githubhjs
githubhjs / bsubrepeater.sh
Last active September 5, 2025 09:19
bsubrepeater: repeatedly (re)submit an LSF job when it disappears from bjobs
#!/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() {
@githubhjs
githubhjs / dedup_env_var.zsh
Last active September 3, 2025 09:45
This Zsh function, dedup_env_var, is designed to remove duplicate entries from a colon-separated environment variable, such as $PATH.
#!/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.
@githubhjs
githubhjs / SortIndexAndTake.scala
Created August 28, 2024 06:31 — forked from chick/SortIndexAndTake.scala
Example of a way of sorting a vector of FixedPoint values, returning the array indices of first N lowest values
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
/**
@githubhjs
githubhjs / _template.ott
Created October 19, 2023 02:06 — forked from rossant/_template.ott
Convert from Markdown to OpenOffice for Linux Magazine
@githubhjs
githubhjs / twinapps_required_apps.xml
Last active October 19, 2023 09:46 — forked from shakalaca/twinapps_required_apps.xml
給 ZenUI 4.0 之後 (including Asus Rog Phone 3) 應用分身使用的 app (including 野球魂/プロスピA) 支援設定檔
<?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 &amp; 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>
@githubhjs
githubhjs / nycu-oauth-document.md
Created October 24, 2022 07:17 — forked from yuchingtw/nycu-oauth-document.md
陽明交通大學 OAuth 服務 - 開發者說明文件

陽明交通大學 OAuth 服務 - 開發者說明文件

這裡會介紹如何透過陽明交通大學 OAuth 服務獲取使用者資訊。本平台是依據 OAuth 2.0 (RFC6749) 的標準開發,目前僅開放 Authorization Code 方式來認證。

開放欄位

  • Email
  • 內容:Email, 帳號名稱
@githubhjs
githubhjs / gitk
Created June 15, 2020 06:40 — forked from RootKiller/gitk
gitk dark theme
set mainfont {{Open Sans} 10}
set textfont {Consolas 9}
set uifont {Tahoma 9 bold}
set tabstop 8
set findmergefiles 0
set maxgraphpct 50
set maxwidth 16
set cmitmode patch
set wrapcomment none
set autoselect 1
[index]
[#1]前言
[#2]游戏
[#3]衍生游戏
[#4]书籍-非小说
[#5]小说
[#6]影视以及动画
[#7]漫画
[/index]
[size=4][b]可以转载、但转载[color=Red]请高亮[/color]注明来源链接以及作者、并在转载后将帖子链接用[color=Red]短消息[/color]发给我[/b][/size]
@githubhjs
githubhjs / SimpleHTTPServerWithUpload.py
Created December 9, 2018 04:51 — forked from UniIsland/SimpleHTTPServerWithUpload.py
Simple Python Http Server with Upload
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""
@githubhjs
githubhjs / Connect-to-Android-WebDAV-Server.md
Created January 22, 2018 03:11 — forked from akaleeroy/Connect-to-Android-WebDAV-Server.md
Access phone storage over WiFi with WebDAV Server for Android

Access phone storage over WiFi

Batch file to map your Android phone as network drive in Windows.

Preview of Phone.cmd usage

Requirements