Skip to content

Instantly share code, notes, and snippets.

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

林博仁(Buo-ren, Lin) brlin-tw

:octocat:
Loading status...
View GitHub Profile
@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:

@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
Thread 1 "poedit" received signal SIGSEGV, Segmentation fault.
0x00007fa29b5c2192 in EVP_PBE_cleanup ()
from target:/snap/poedit/8/gnome-platform/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
#0 0x00007fa29b5c2192 in EVP_PBE_cleanup ()
from target:/snap/poedit/8/gnome-platform/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
#1 0x00007fa29b5bbe67 in EVP_cleanup ()
from target:/snap/poedit/8/gnome-platform/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
#2 0x0000000000816edc in boost::asio::ssl::detail::openssl_init_base::do_init::~do_init() ()
#3 0x000000000085ecf4 in std::_Sp_counted_ptr<boost::asio::ssl::detail::openssl_init_base::do_init*, (__gnu_cxx::_Lock_policy)2>::_M_dispose() ()
#4 0x00007fa29be87696 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() ()
@brlin-tw
brlin-tw / CGGPKICryptAdapterSetup.patched.install.sh
Created January 18, 2019 16:56
CGGPKICryptAdapterSetup.patched.install.sh
#!/usr/bin/env bash
set -o errexit
if test "${USER}" != root; then
echo You should run this program as root.
exit 1
fi
if test -e /opt/Changingtec/CGServiSign; then
@brlin-tw
brlin-tw / guvcview.strace.log
Created June 20, 2018 22:45
Strace Log when guvcview-brlin Snap Package is Launched Without Connecting to `hardware-observe` Interface
This file has been truncated, but you can view the full file.
14079 execve("/usr/lib/snapd/snap-confine", ["/usr/lib/snapd/snap-confine", "snap.guvcview-brlin.guvcview", "/usr/lib/snapd/snap-exec", "guvcview-brlin.guvcview"], [/* 102 vars */]) = 0
14079 brk(NULL) = 0x1265000
14079 fcntl(0, F_GETFD) = 0
14079 fcntl(1, F_GETFD) = 0
14079 fcntl(2, F_GETFD) = 0
14079 access("/etc/suid-debug", F_OK) = -1 ENOENT (No such file or directory)
14079 access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
14079 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
14079 open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
14079 fstat(3, {st_mode=S_IFREG|0644, st_size=231591, ...}) = 0
@brlin-tw
brlin-tw / Clean Filter for GNU Bash Scripts.bash
Created May 2, 2018 11:06
Source'd parameter definition in AND LIST in bash script isn't find afterwards - Stack Overflow
#!/usr/bin/env bash
declare -r APPLICATION_NAME='Clean Filter for GNU Bash Scripts'
# 林博仁 © 2017, 2018
# NOTE: ALWAYS PRINT MESSAGES TO STDERR as output to stdout will contaminate the input files when the program is operate in filter mode.
## Makes debuggers' life easier - Unofficial Bash Strict Mode
## BASHDOC: Shell Builtin Commands - Modifying Shell Behavior - The Set Builtin
set -o errexit
set -o errtrace
@brlin-tw
brlin-tw / strings.xml
Created April 10, 2018 14:34
strings.xml translation shared with Stringlate
<resources>
<string name="original_string">原始字串:</string>
<string name="translated_string_colon">翻譯好的字串:</string>
<string name="next">下一個</string>
<string name="current_string_id">目前的字串識別名:</string>
<string name="selected_locale">被選取的語言系統:</string>
<string name="welcome">歡迎使用 Stringlate!請輸入專案名稱與其擁有者名稱或是將版控庫的網址貼到下面以繼續。</string>
<string name="owner_hint">擁有者識別名稱</string>
<string name="repository_hint">版控庫名</string>
<string name="or">或</string>

This markdown source:

# 林博仁<br>Buo-Ren, Lin
關於林博仁的資訊<space><space>
Information about Buo-Ren, Lin<space><space>
<https://Lin-Buo-Ren.github.io>

Renders on GitHub as: