Skip to content

Instantly share code, notes, and snippets.

View brlin-tw's full-sized avatar
Loading status...

林博仁 Buo-ren Lin brlin-tw

Loading status...
View GitHub Profile
@brlin-tw
brlin-tw / create-hotspot.md
Created November 8, 2025 16:53 — forked from narate/create-hotspot.md
Create Wi-Fi Hotspot on Linux using nmcli

Create a Wi-Fi hotspot on Linux using nmcli

Original post : https://unix.stackexchange.com/a/310699

nmcli con add type wifi ifname wlan0 con-name Hostspot autoconnect yes ssid Hostspot
nmcli con modify Hostspot 802-11-wireless.mode ap 802-11-wireless.band bg ipv4.method shared
nmcli con modify Hostspot wifi-sec.key-mgmt wpa-psk
nmcli con modify Hostspot wifi-sec.psk "veryveryhardpassword1234"
@brlin-tw
brlin-tw / session.out
Last active October 26, 2025 09:17
(WITHDRAWED) User command history logging robustness test #1
$ stat /var/log/history
File: /var/log/history
Size: 0 Blocks: 0 IO Block: 4096 directory
Device: 0,200 Inode: 73657901 Links: 1
Access: (0777/drwxrwxrwx) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2025-10-26 08:02:20.975866783 +0000
Modify: 2025-10-26 08:02:20.975866783 +0000
Change: 2025-10-26 08:02:20.975866783 +0000
Birth: 2025-10-26 07:59:38.743618000 +0000
$ rm -r /var/log/history
@brlin-tw
brlin-tw / readme.md
Created July 7, 2025 02:47 — forked from ethaniel/readme.md
This file explains how to update the firmware of `Aquantia Corp. AQC107 NBase-T/IEEE 802.3bz Ethernet Controller` ethernet controller in Linux

Why

I've noticed RX packet drops on my PCI card (InDroppedDma was too high). I suspected that it was because of a firmware problem, so I decided to try to find a way to update it.

There was no official linux firmware updater, however I found an unofficial one published some time ago, which worked well when combined with the latest firmware.

Use at your own risk, however I didn't experience any problems.

Explanation:

@brlin-tw
brlin-tw / zendesk.md
Created October 16, 2024 09:46 — forked from hackermondev/zendesk.md
1 bug, $50,000+ in bounties, how Zendesk intentionally left a backdoor in hundreds of Fortune 500 companies

hi, i'm daniel. i'm a 15-year-old with some programming experience and i do a little bug hunting in my free time. here's the insane story of how I found a single bug that affected over half of all Fortune 500 companies:

say hello to zendesk

If you've spent some time online, you’ve probably come across Zendesk.

Zendesk is a customer service tool used by some of the world’s top companies. It’s easy to set up: you link it to your company’s support email (like support@company.com), and Zendesk starts managing incoming emails and creating tickets. You can handle these tickets yourself or have a support team do it for you. Zendesk is a billion-dollar company, trusted by big names like Cloudflare.

Personally, I’ve always found it surprising that these massive companies, worth billions, rely on third-party tools like Zendesk instead of building their own in-house ticketing systems.

your weakest link

@brlin-tw
brlin-tw / gist:960522af6e890f11563df748db7cb712
Created July 1, 2024 12:11
fio-test-result-d3d49d1-10gb-testfile-exfat.out.txt
$ TEST_FILE=/media/brlin/1TB/fio-test.bin TEST_SIZE=10G fio flash-storage-generic.fio
seq-read: (g=0): rw=read, bs=(R) 4096KiB-4096KiB, (W) 4096KiB-4096KiB, (T) 4096KiB-4096KiB, ioengine=libaio, iodepth=8
seq-write: (g=1): rw=write, bs=(R) 4096KiB-4096KiB, (W) 4096KiB-4096KiB, (T) 4096KiB-4096KiB, ioengine=libaio, iodepth=8
rand-read: (g=2): rw=randread, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=32
rand-write: (g=3): rw=randwrite, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=libaio, iodepth=32
fio-3.36
Starting 4 processes
seq-read: Laying out IO file (1 file / 10256MiB)
Jobs: 1 (f=1): [_(2),r(1),P(1)][34.3%][r=48.0MiB/s,w=392MiB/s][r=12.3k,w=98 IOPS][eta 01m:59Jobs: 1 (f=1): [_(2),r(1),P(1)][36.8%][r=205MiB/s][r=52.5k IOPS][eta 01m:48s] Jobs: 1 (f=0): [_(3),f(1)][100.0%][w=278MiB/s][w=71.0k IOPS][eta 00m:00s]
seq-read: (groupid=0, jobs=1): err= 0: pid=273989: Mon Jul 1 16:12:11 2024
@brlin-tw
brlin-tw / x-resize
Created July 24, 2023 06:02 — forked from wynnchel/x-resize
Manual Implementation of Auto Resizing For Non-Gnome Environments (like XFCE) running under Spice/Libvirt
#!/bin/bash
# Steps:
# 1) Make sure bash is available
# 2) Create udev rule
# - path to new udev rule: /etc/udev/rules.d/50-x-resize.rules
# - udev rule content:
# ACTION=="change",KERNEL=="card0", SUBSYSTEM=="drm", RUN+="/usr/local/bin/x-resize"
# 3) Create /var/log/autores directory
# 4) Create script /usr/local/bin/x-resize (this file) and make executable
# 5) Reload udev rules with `sudo udevadm control --reload-rules`
@brlin-tw
brlin-tw / archived.md
Created March 25, 2022 02:26 — forked from nevack/archived.md
[ARCHIVED] Fix for CSR Dongle 0a12:0001 ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)

This gist is currenctly archived.

Please refer to previous revisions if you know what to do.

The patch proposed was merged into kernel in 5.8 release, but no longer working as of linux 5.11

Please contact me, if you have new info about workarounds for CSR Bluetooth Dongle.

Telegram:

# UEFI 開機模式之可開機可移除式媒體研究<br>Bootable Removable Media Research under UEFI Boot Mode
## 本作品採用之智慧財產授權條款<br>License
本作品採用 Creative Commons 姓名標示 - 相同方式分享授權條款第 4.0 版或其任意更近期版本釋出供任何人在授權範圍內自由使用。
授權範圍外之使用請先來信取得授權。
## UEFI 規範研究
## 美好的想像
@brlin-tw
brlin-tw / asciinema-to-scriptreplay
Created December 5, 2019 11:57 — forked from izabera/asciinema-to-scriptreplay
convert between asciinema and scriptreplay
#!/bin/bash
exec {times}> times {typescript}> typescript < "${1-/dev/stdin}"
while read -r; do [[ $REPLY = ' "stdout": [' ]] && break; done # skip to this line
LANG=C
printf "Script started on %(%c)T\n" -1 >&"$typescript" # dummy
while read -r open; [[ $open = '[' ]]; do
read -r elapsed; read -r string; read -r close
eval printf %b%n "$string" characters >&"$typescript" # put count in $characters
printf "%s %s\n" "${elapsed%,}" "$characters" >&"$times"
done
@brlin-tw
brlin-tw / Steam full system information report.txt
Created February 20, 2019 08:05
Steam full system information report
Computer Information:
Manufacturer: Unknown
Model: Unknown
Form Factor: Desktop
No Touch Input Detected
Processor Information:
CPU Vendor: GenuineIntel
CPU Brand: Intel(R) Core(TM) i5-4460 CPU @ 3.20GHz
CPU Family: 0x6