Skip to content

Instantly share code, notes, and snippets.

View IS-Kuan's full-sized avatar

IS-Kuan

  • Taipei, Taiwan
View GitHub Profile
@IS-Kuan
IS-Kuan / README.md
Last active March 9, 2026 09:53
`sscep enroll` with `challengePassword`

Dogtag PKI

Dogtag PKI 的 SCEP 支援

雖然 OpenXPKI 可以很容易設定成「在 CSR 沒有包含 challenge password 的情況直接回傳 PENDING」, 但 Dogtag PKI 它走的認證方式比較嚴苛,經過實驗目前還沒找出 OpenXPKI 那種行為要怎麼設定,但目前確定能作到的是「預先定義 IP + Challenge Password 的組合」的驗證方式(這好像也是一般現實世界會使用的自動化方式),也就是 FlatFileAuth。

具體來說就是寫入一個 flatfile.txt 裡面包含這樣的內容:

UID:192.168.28.217
PWD:hello
@IS-Kuan
IS-Kuan / github_issue_expander_bookmarklet.js
Created January 15, 2026 04:52
Create a bookmark, then copy these code into your bookmark URL. When encountered a very-long Github issue, click it and all comments will be expanded.
javascript:function run(){let btns=document.querySelectorAll("button");let loaders=[];for(const btn of btns){if(btn.textContent.trim().includes("Load more")){loaders.push(btn);btn.click()}}if(loaders.length>0){setTimeout(run,5e3)}}setTimeout(run,500);void"return undefined here";
@IS-Kuan
IS-Kuan / form.html
Created June 14, 2019 05:12 — forked from runspired/form.html
How to turn off password and email/username autocomplete.
<!--
<form autocomplete="off"> will turn off autocomplete for the form in most browsers
except for username/email/password fields
-->
<form autocomplete="off">
<!-- fake fields are a workaround for chrome/opera autofill getting the wrong fields -->
<input id="username" style="display:none" type="text" name="fakeusernameremembered">
<input id="password" style="display:none" type="password" name="fakepasswordremembered">
@IS-Kuan
IS-Kuan / rwd.css
Created November 15, 2017 09:35
table td text-ellipsis example
th.name { width: 100%; }
td.name {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
@media screen and (max-width: 1399px) { td.name { max-width: 100px; } }
ngAnnotatePlugin = require('ng-annotate-webpack-plugin')
copyWebpackPlugin = require('copy-webpack-plugin')
webpack = require('webpack')
path = require('path')
ExtractTextPlugin = require('extract-text-webpack-plugin')
# https://stackoverflow.com/questions/39642601/typeerror-path-replace-is-not-a-function
# LESS / SASS will be build and extracted into separate .css files
cssExtractor = new ExtractTextPlugin('[name].css')
@IS-Kuan
IS-Kuan / ffmppeg-advanced-playbook-nvenc-and-libav-and-vaapi.md
Created May 26, 2017 04:40 — forked from Brainiarc7/ffmppeg-advanced-playbook-nvenc-and-libav-and-vaapi.md
FFMpeg's playbook: Advanced encoding options with hardware-accelerated acceleration for both NVIDIA NVENC's and Intel's VAAPI-based hardware encoders in both ffmpeg and libav.

FFmpeg and libav's playbook: Advanced encoding options with hardware-based acceleration, NVIDIA's NVENC and Intel's VAAPI-based encoder.

Hello guys,

Continuing from this guide to building ffmpeg and libav with NVENC and VAAPI enabled, this snippet will cover advanced options that you can use with ffmpeg and libav on both NVENC and VAAPI hardware-based encoders.

For ffmpeg:

;; ============================================
;; Coldnew's Font Size Conf for Org-Table
;; ============================================
;; 特殊字型設定
(when (window-system)
(if (eq system-type 'windows-nt)
(set-face-attribute 'default nil :font "Consolas-9"))
(defvar emacs-english-font "DejaVu Sans Mono" "The font name of English.")
(defvar emacs-cjk-font "文泉驛等寬微米黑" "The font name for CJK.")
@IS-Kuan
IS-Kuan / freeze-emacs.scss
Last active March 29, 2017 05:15
This SCSS file may stuck your Emacs significantly (at least tested on Emacs 25.1 installed via Brew, statrtup with -Q option). Move cursor to EOL of `$colors:` , press Enter then type some characters. Use `pkill -SIGUSR2 Emacs` to interrupt it forcely. It seems that jit-lock.el is the murdurer.
// === colors ====
$colors:
"base_grey" #e8e8e8,
"base_white" #fff,
"base_black" #333,
"switch1_color" #e6943b,
"swtich2_color" #56b538,
"wireless_color" #4baae2,
"router_color" #969696,
"ite_color" #756bb1,
@IS-Kuan
IS-Kuan / stream_to_youtube.sh
Created November 23, 2016 09:00 — forked from olasd/stream_to_youtube.sh
Stream video to youtube via ffmpeg
#! /bin/bash
#
# Diffusion youtube avec ffmpeg
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée.
VBR="2500k" # Bitrate de la vidéo en sortie
FPS="30" # FPS de la vidéo en sortie
QUAL="medium" # Preset de qualité FFMPEG
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube
QtAV 1.11.0(Nov 11 2016, 10:52:48)
Multimedia framework base on Qt and FFmpeg.
Distributed under the terms of LGPLv2.1 or later.
Shanghai University->S3 Graphics->Deepin, Shanghai, ChinaCopyright (C) 2012-2016 Wang Bin (aka. Lucas Wang) wbsecg1@gmail.com
Donate: http://qtav.org/donate.html
Source: https://github.com/wang-bin/QtAV
Home page: http://qtav.org"Build with Qt-5.7.0"
"FFmpeg/Libav configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-li