Skip to content

Instantly share code, notes, and snippets.

View liuyigh's full-sized avatar

Yi Liu liuyigh

View GitHub Profile
liuyigh / naturalScroll.ahk
Last active June 15, 2023 04:15
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}"
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",
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<!-- Default system-ui fonts -->
<match target="pattern">
<test name="family">
<edit name="family" mode="prepend" binding="strong">
liuyigh /
Last active May 22, 2020 21:06
Default Inkscape Template Dark Theme US Letter
liuyigh /
Created February 21, 2019 00:24 — forked from 66Ton99/
Capturing Python Log Output In A Variable
import logging
from StringIO import StringIO as StringBuffer
logger = logging.getLogger('basic_logger')
### Setup the console handler with a StringIO object
log_capture_string = StringBuffer()
# log_capture_string.encoding = 'cp1251'
ch = logging.StreamHandler(log_capture_string)
liuyigh / nginx.conf
Last active December 15, 2018 04:28 — forked from QROkes/nginx.conf
NGINX Configuration for WordPress Multisite + Domain Mapping with HTTPS
#sudo certbot certonly --webroot -w /srv/users/serverpilot/apps/pkubio/public -d -d -d -d -d -d
server {
listen 80;
listen [::]:80;
return 301 https://$host$request_uri;
server {
liuyigh / trialDB.csv
Last active June 14, 2018 16:49
Trialert: Notify You by eMail When Clinical Trial Updates
index name ctID lastUpdate
0 DV281 NCT03326752 November 1, 2017
1 SD101 NCT02521870 December 7, 2017
2 AZD1419 NCT02898662 December 21, 2017
3 SD101+MK1966 NCT02731742 December 11, 2017
liuyigh / -
Created September 11, 2017 23:06 — forked from jedisct1/-
Make top look less ugly on Arch Linux
remove your ~/.toprc (if any)
start "top"
press z
press V
press 1
press y
press m m
press t t t
press W
liuyigh / iPyNbViewer_v3.applescript
Last active December 13, 2018 08:08
iPyNbViewer: Standalone App for IPython Notebook (v3; latest)
on open this_item
tell application "Finder"
set pathList to (quoted form of POSIX path of (folder of the front window as alias))
set command to "clear; cd " &amp; pathList
end tell
tell application "System Events"
-- some versions might identify as "iTerm2" instead of "iTerm"
set isRunning to (exists (processes where name is "iTerm")) or (exists (processes where name is "iTerm2"))
liuyigh / iPyNbViewer_v2.applescript
Created September 11, 2017 19:20
iPyNbViewer: Standalone App for IPython Notebook v2 (outdated; use v3 instead)
on open this_item
tell application "iTerm"
set iPyNbViewer to (make new terminal)
tell iPyNbViewer
activate current session
launch session "Default Session"
tell the last session
set name to "IPython Notebook"