Skip to content

Instantly share code, notes, and snippets.

View llinfeng's full-sized avatar

Linfeng Li llinfeng

  • The University of Michigan
  • Ann Arbor, MI, USA
View GitHub Profile
@llinfeng
llinfeng / Overleaf_V2_mappings.js
Last active December 16, 2023 23:39
Greasemonkey Script with Forward search in Overleaf
// ==UserScript==
// @name Overleaf Editor Custom VIM Keybindings
// @namespace http://tampermonkey.net/
// @version 0.1
// @match https://www.overleaf.com/project/*
// @grant none
// Source 1: https://groups.google.com/d/msg/ace-discuss/gwXMzUM17I4/9B_acHBSCQAJ
// Source 2: https://www.overleaf.com/learn/how-to/How_can_I_define_custom_Vim_macros_in_a_vimrc_file_on_Overleaf%3F
// ==/UserScript==
@llinfeng
llinfeng / Config_Zathura.txt
Last active May 19, 2022 15:53
Config VimTeX + Zathura with forward/backward search using NeoVim
# Store as `~/.config/zathura/zathurarc`
# Store the following in `~/.config/nvim/init.vim`.
# Though, with VimTeX, it is optional to populate the synctex setting in Zathura.
set synctex true
@llinfeng
llinfeng / eink_clean.ahk
Last active December 14, 2023 04:09
Force full-screen refresh on e-ink monitors
#SingleInstance, force ; Allow only one instance of this script to be running.
#Persistent ; To stop the script from exiting.
; Here, press F1 to trigger the black/white flash
F1::
; Source: https://superuser.com/questions/662264/i-would-like-to-make-the-screen-go-black-every-8-seconds-how
Gui, Color, 000000
Gui, Show, x-5000 y-20 w8000 h8000
sleep 333
Gui, Color, FFFFFF
@llinfeng
llinfeng / .OpenOneNoteLink_on_Android.md
Last active February 9, 2023 03:42
Use adb to launch a page in OneNote APK on an Android tablet
@llinfeng
llinfeng / profile.log
Created September 15, 2022 12:35
Profiling Vimwiki Link Creation
SCRIPT /home/llinfeng/vimfiles/plugged/vimwiki/autoload/vimwiki/diary.vim
Sourced 1 time
Total time: 0.000560
Self time: 0.000560
count total (s) self (s)
" vim:tabstop=2:shiftwidth=2:expandtab:textwidth=99
" Vimwiki autoload plugin file
" Description: Handle diary notes
" Home: https://github.com/vimwiki/vimwiki/
@llinfeng
llinfeng / profile.log
Created September 15, 2022 12:50
Profiling vimwiki link creation on a Linux machine
FUNCTION <SNR>167_update_hg_branch()
Defined: ~/vimfiles/plugged/vim-airline/autoload/airline/extensions/branch.vim:148
Called 23 times
Total time: 0.002346
Self time: 0.002071
count total (s) self (s)
23 0.000465 0.000190 if airline#util#has_lawrencium()
let cmd='LC_ALL=C hg qtop'
let stl=lawrencium#statusline()
@llinfeng
llinfeng / Overleaf Editor Custom VIM Keybindings (2023).user.js
Last active March 2, 2023 19:17
Custom vim keybinds for Overleaf (compatible with CodeMirror 5/6)
// ==UserScript==
// @name Overleaf Editor Custom VIM Keybindings (2023)
// @namespace http://tampermonkey.net/
// @version 0.0.2
// @match https://www.overleaf.com/project/*
// @grant none
// ==/UserScript==
(function() {
'use strict';