Skip to content

Instantly share code, notes, and snippets.

View BibbyChung's full-sized avatar
🏠
Working from home

Bibby BibbyChung

🏠
Working from home
View GitHub Profile
@BibbyChung
BibbyChung / ssh-host.sh
Last active July 13, 2026 02:55
ssh-host.sh
#!/usr/bin/env bash
# ssh-host.sh — 一行式 SSH 公鑰登入設定腳本
# 用法:curl -fsSL <gist_url> -o /tmp/ssh-host.sh && sudo bash /tmp/ssh-host.sh
set -Eeuo pipefail
# ── 全域變數 ──────────────────────────────────
distro=""
pm=""
pkg=""
@BibbyChung
BibbyChung / recover.sh
Last active July 13, 2026 02:21
recover.sh
#!/usr/bin/env bash
# recover.sh — 新機器一行式還原 wrapper
# 用法:curl -fsSL <gist_url> -o /tmp/recover.sh && bash /tmp/recover.sh
# 亦可直接 bash recover.sh 在本機測試
set -Eeuo pipefail
# ── Global variables ──────────────────────────
system_type=$(uname -s)
SSH_KEY_PATH="$HOME/.ssh/id_rsa"
DOTFILES_REPO="git@github.com:BibbyChung/dotfiles.git"
@BibbyChung
BibbyChung / subscription.extensions.ts
Last active June 25, 2019 06:45
easy to unsubscribe...
import { Subscription } from 'rxjs';
declare module 'rxjs/internal/Subscription' {
interface Subscription {
toUnsubscription(
this: Subscription,
sub: Subscription
): void;
}
}