Skip to content

Instantly share code, notes, and snippets.

View sujunmin's full-sized avatar

Su, Jun-Ming sujunmin

View GitHub Profile
@sujunmin
sujunmin / graylog-rest-api-example.ps1
Created June 12, 2018 07:20
Example for get all data for specified users from Graylog REST API
Set-Location "C:\reports"
$Users = "sujunmin"
$MailFrom = "from@mail.com"
$MailTo = "sujunmin@gmail.com"
$MailServer = "mail.server.ip"
$UserToken = "token"
$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:token" -f $UserToken)))
$Users | Foreach-Object {
@sujunmin
sujunmin / Huawei-4G-Modem-E3372h-607-flash-to-stick-mode-from-bricked.md
Last active May 22, 2023 09:08
Huawei E3372h-607 刷到掛之處理紀錄

因為原廠支援有問題狀態下需要自己處理原有的刷機機制遇到新版 Firmware 無法順利降版並轉成 Stick Mode,所以找到這一篇來處理。

  1. 事前準備

    a. 一台 Linux (Windows 也可以,但我沒有成功完成過)

    b. 一根迴紋針 (進 USB boot 用)

    c. 要刷的韌體 BIN 檔

@sujunmin
sujunmin / windows-install-nginx-gca-sni.md
Last active February 23, 2019 09:48
Windows 安裝 nginx, GCA 憑證處理紀錄, SNI
@sujunmin
sujunmin / LINE-Chrome-Extension-Cannot-Copy-Text.md
Last active November 21, 2017 10:59
LINE Chrome extension 無法複製問題
  1. 到 Chrome 的 Default Profile 找到 LINE Chrome extension 的 index.html

    a. Windows 7, 8.1, and 10: C:\Users\<username>\AppData\Local\Google\Chrome\User Data\Default\Extensions\menkifleemblimdogmoihpfopnplikde\<version>\index.html

    b. Mac OS X El Capitan: Users/<username>/Library/Application Support/Google/Chrome/Default/Extensions/menkifleemblimdogmoihpfopnplikde/<version>/index.html

    c. Linux: /home/<username>/.config/google-chrome/default/Extensions/menkifleemblimdogmoihpfopnplikde/<version>/index.html

  2. 找到 <body id="app_body" on="">,修改為 <body id="app_body" on="" style="user-select: auto;">

  3. 收工

@sujunmin
sujunmin / mac-osx-mount-windows-ntfs-in-write-mode.md
Last active March 16, 2017 09:53
Mac OS X Mount Windows NTFS In Write Mode
  1. Install osxfuse

  2. Install homebrew

  3. In Terminal, brew install homebrew/fuse/ntfs-3g

  4. Reboot, press Option + Command + R to boot in recovery mode (I don't have recovery partition, so press Option + Command + R)

  5. Open Terminal, csrutil disable (Disable System Integrity Protection)

  6. Reboot again normally

  7. In Terminal

    a. sudo mv /sbin/mount_ntfs /sbin/mount_ntfs.original

@sujunmin
sujunmin / alteon-4408-remote-command-using-plink-ssh.md
Last active March 8, 2017 07:25
Send Remote Commands to Radware Alteon 4408 Over SSH By Using PLINK
@sujunmin
sujunmin / telegram-build-from-qt-creator-under-ubuntu-and-modify-fonts.md
Last active March 8, 2017 08:20
Build instructions for Qt Creator 4.0.3 under Ubuntu 16.04 and Modify Fonts

##Build instructions for Qt Creator 4.0.3 under Ubuntu 16.04 and Modify Fonts

###Prepare

###Prepare folder

@sujunmin
sujunmin / tsql_pivot_split.md
Last active June 29, 2016 05:56
SQL Server TSQL 開發技巧- 將資料庫的字串分解後_直接轉換成欄位 - PIVOT 與 SPLIT
---------------------------------------
-- 將資料庫的字串分解後,直接轉換成欄位
---------------------------------------
/*
mystring
------------------------
AAA_BBBB_CC
DDD_EEEE_FF