Skip to content

Instantly share code, notes, and snippets.

@zhlinh
zhlinh / .ideavimrc
Created September 1, 2023 06:24
idea vim plugin settings as .ideavimrc
# source
source ~/.vimrc
" leader
let mapleader=','
""" Plugins --------------------------------
set surround
set multiple-cursors
set commentary
set argtextobj
set easymotion
@zhlinh
zhlinh / .zshrc
Last active October 6, 2023 08:17
oh-my-zsh zshrc config
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
@zhlinh
zhlinh / marta-preferences.yaml
Last active October 6, 2022 14:24
marta file manager app, [Marta](https://github.com/marta-file-manager)
behavior {
theme "Classic"
dateFormat {
normal "%-Y-%m-%d"
}
timeFormat {
separator " "
normal "%-H:%M"
@zhlinh
zhlinh / cpplint_pre_commit_hook.sh
Created October 22, 2019 02:56 — forked from brickgao/cpplint_pre_commit_hook.sh
cpplint pre-commit hook
#!/bin/sh
#
# Modified from http://qiita.com/janus_wel/items/cfc6914d6b7b8bf185b6
#
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-commit".
@zhlinh
zhlinh / viatc.ini
Last active August 19, 2016 01:32
Configuration for ViATc-0.5.2, which means Vim Mode At Total Commander version 0.5.2. - https://sourceforge.net/projects/viatc/files/
[Configuration]
Vim=1
Toggle=
GlobalTogg=0
Suspend=<alt>`
GlobalSusp=0
TrayIcon=1
Service=1
Startup=1
GroupWarn=1
@zhlinh
zhlinh / CapsLock.ahk
Last active March 9, 2019 12:22
This AHK script provides an enhancement towards the CapsLock.
;=====================================================================o
; AHK Script |
; CapsLock Enhancement |
;---------------------------------------------------------------------o
;Updated: March 09, 2019 |
;Gist: https://gist.github.com/9493402e337e03b8a80c4afdfbdf008c.git |
;-----------------------o---------------------------------------------o
;Description: |
; This AHK script provides an enhancement towards the CapsLock, and |
; turns CapsLock into an useful function Key just like Ctrl and Alt |
@zhlinh
zhlinh / git.zsh
Created October 10, 2015 02:40
oh-my-zsh/lib/git.zsh. The slowness of my zsh prompt when in a git-svn managed directory was killing me. I improved it by removing the git status stuff that slows it down...
function git_prompt_info() {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$ZSH_THEME_GIT_PROMPT_SUFFIX"
}
## other functions ... ##
@zhlinh
zhlinh / ptpd2.conf.default-full
Created October 5, 2015 11:37
PTPDv2 version 2.3.0 default configuration
; ========================================
; PTPDv2 version 2.3.0 default configuration
; ========================================
; NOTE: the following settings are affected by ptpengine:preset selection:
; ptpengine:slave_only
; clock:no_adjust
; ptpengine:clock_class - allowed range and default value
; To see all preset settings, run ptpd2 -H (--long-help)
@zhlinh
zhlinh / 25_windows_uefi
Last active October 1, 2015 01:10
windows_uefi, copy to /etc/grub.d, chmod +x, sudo echo GRUB_DISABLE_OS_PROBER=true >> /etc/default/grub and sudo update-grub
#!/bin/sh
set -e
# Probe for UEFI entries in EFI system partition
prefix="/usr"
exec_prefix="${prefix}"
datarootdir="${prefix}/share"
export TEXTDOMAIN=grub
export TEXTDOMAINDIR="${datarootdir}/locale"
@zhlinh
zhlinh / addLoadEvent.js
Created August 7, 2015 11:05
Ajax - Asynchronous request
// file: scripts/addLoadEvent.js
function addLoadEvent(func){
var oldonload = window.onload;
if(typeof window.onload != "function"){
window.onload = func;
}else {
window.onload = function(){
oldonload();
func();
}