Skip to content

Instantly share code, notes, and snippets.

View liuyigh's full-sized avatar

Yi Liu liuyigh

View GitHub Profile
@liuyigh
liuyigh / logging_to_str.py
Created February 21, 2019 00:24 — forked from 66Ton99/logging_to_str.py
Capturing Python Log Output In A Variable
import logging
from StringIO import StringIO as StringBuffer
logger = logging.getLogger('basic_logger')
logger.setLevel(logging.DEBUG)
### Setup the console handler with a StringIO object
log_capture_string = StringBuffer()
# log_capture_string.encoding = 'cp1251'
ch = logging.StreamHandler(log_capture_string)
@liuyigh
liuyigh / Inkscape_Default.md
Last active May 22, 2020 21:06
Default Inkscape Template Dark Theme US Letter
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>
<!-- Default system-ui fonts -->
<match target="pattern">
<test name="family">
<string>system-ui</string>
</test>
<edit name="family" mode="prepend" binding="strong">
@liuyigh
liuyigh / SolarizedDarkHC.json
Created May 31, 2023 03:52
Solarized Dark High Contrast color theme for Windows Terminal
{
"background": "#001e27",
"black": "#002831",
"blue": "#2176c7",
"brightBlack": "#006488",
"brightBlue": "#178ec8",
"brightCyan": "#00b39e",
"brightGreen": "#51ef84",
"brightPurple": "#e24d8e",
"brightRed": "#f5163b",
@liuyigh
liuyigh / naturalScroll.ahk
Last active October 13, 2024 05:04
AutoHotKey v2 natural (reverse) mouse scrolling for Windows
#Requires AutoHotkey v2.0
#UseHook 1 ; Enable MouseHook to capture scrolling anywhere in Windows
WheelUp:: {
SendInput "{WheelDown}"
Return
}
WheelDown::{