Skip to content

Instantly share code, notes, and snippets.

View zmx's full-sized avatar

Zhong, Ming-Xun zmx

View GitHub Profile
@zmx
zmx / gist:ce91750bcc4c80cb34bc24de7c426f19
Created March 4, 2024 06:33
Prometheus Operator Blackbox Exporter Auto Discover Ingress
apiVersion: monitoring.coreos.com/v1
kind: Probe
metadata:
name: tls-probe
namespace: monitoring
spec:
interval: 60s
module: http_2xx
prober:
path: /probe
@zmx
zmx / k8s_sync_secret.sh
Created January 16, 2024 17:11
K8s Sync Secrets from Template Job
# Origin: https://colocatedeventsna2023.sched.com/event/1Rj2e
kubectl -n preview-apps get secret db-secret -o yaml | \
yq 'del(.metadata.creationTimestamp, .metadata.uid, .metadata.resourceVersion, .metadata.namespace,
.metadata.annotations, .metadata.ownerReferences)' | \
kubectl apply --namespace $PR_NUMBER -f -
@zmx
zmx / helm_ignore_double_curly.yaml
Created January 16, 2024 06:40
Helm template ignore {{expr}}
# A viable hack is to let Helm render the template as a raw string.
# Note the opening and closing curly bracket with a backtick:
#
# Origin: https://github.com/helm/helm/issues/2798#issuecomment-470435015
#
# Excerpt from a Prometheus Alertmanager yaml
receivers:
- name: slack-receiver
slack_configs:
- text: |-
@zmx
zmx / kwok-macos.sh
Last active December 26, 2023 09:45
kwok on macOS
# https://kwok.sigs.k8s.io/docs/user/kwokctl-platform-specific-binaries/#use-unofficial-binaries
KUBE_VERSION="v1.29.0"
cat <<EOF >> ~/.kwok/kwok.yaml
---
kind: KwokctlConfiguration
apiVersion: config.kwok.x-k8s.io/v1alpha1
options:
kubeBinaryPrefix: https://github.com/kwok-ci/k8s/releases/download/${KUBE_VERSION}-kwok.0-darwin-arm64
---
EOF
@zmx
zmx / mkdocs-hugo-uri.py
Last active October 20, 2023 06:13
mkdocs with hugo "_index.md"
import os
import posixpath
from urllib.parse import quote as urlquote
# Hugo rule https://gohugo.io/functions/urls/urlize/
#
# We use a small subset
HTML_TEMPLATE = """
@zmx
zmx / kill-kube-ns.sh
Created April 28, 2022 03:24
Kill Terminating Kubernetes Namespace
#!/bin/bash
###############################################################################
# Copyright (c) 2018 Red Hat Inc
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
@zmx
zmx / gist:48e6ebadf19593c11e0a6cc163127750
Created March 2, 2020 07:57
Get AWS EC2 instance IP address in /etc/hosts format
aws ec2 describe-instances --filters "Name=tag:Name,Values=bill*" --query 'Reservations[].Instances[].[PublicIpAddress,Tags[?Key==`Name`]| [0].Value]' --output text
@zmx
zmx / gist:40139244c425f75f4f8b126c71d5c9c7
Created November 26, 2019 09:37 — forked from ilake/gist:3338917
[翻譯] 圖形計算機的故事
作者: iincho (..) 看板: Soft_Job
標題: [翻譯] 圖形計算機的故事
時間: Tue Mar 4 12:04:50 2008
Copyright (c) 2004 Ron Avitzur.
============================================================
本文譯自 http://www.pacifict.com/Story/
已獲得作者授權翻譯並同意於 PTT 發布
https://www.mobile01.com/topicdetail.php?f=18&t=5678447&p=9#71964598
nhpss930094
2019-02-03 15:54 #83
回文私訊連結引言收藏評分回報
因為CA關係所以才要把各區發射器分開,去年採購的300組發射器,都是易利信的,可發射低中高頻~
這跟規劃因該沒關,現在這批人馬大多都還是以前CDMA時代的,維運想發包蓋站,但是上面不同意核發設備跟錢就....
可能過一陣子核心網設定參數會再改,不會把訊號臨界值搞到那麼弱才切換,以前有擎天4G輔助時,自動切換大概壓在-110左右,現在3G自動切換要爛倒-130才會跳過去,低頻乘載能力低,加上頻寬不足,所以才會設定優先2600,現在疊加覆蓋的方式,過一陣子站台邊緣的訊號因該會好很多~~
亞太載波聚合條件很寬,基本上有搜得到,站台參數有開,基本上就算-130也能連,所以有4G+但是網路常常跑得很慢,我試頻均都在10~50之間左右,想破百可能要等沒人用或是你站在站台旁邊,才有可能觸發64QAM 4X4+64QAM+2X2,大部分都是觸發16QAM 2X2甚至QPSK 2X2~~
Verifying I am +zmx on my passcard. https://onename.com/zmx