Skip to content

Instantly share code, notes, and snippets.

@zhlinh
zhlinh / Chrome_Extension - cVim.conf
Last active May 30, 2023 19:34
Chrome_Extension - cVim.conf
" Updated: 2022-06-25
" Author: zhlinh
" Gist: https://gist.github.com/zhlinh/d82bdb0be5990a43ae24
" ----------------------------------------- Base Settings -------------------------------------------
let mapleader=','
set nosmoothscroll
" autofocus: allows websites to automatically focus an input box when they are first loaded
set noautofocus
" typelinkhints: (numerichints required) type text in the link to narrow down numeric hints
set typelinkhints
@zhlinh
zhlinh / gallery.html
Last active August 29, 2015 14:26
JavaScript&DOM - Image Gallery
@zhlinh
zhlinh / github_markdown.css
Created August 5, 2015 04:25
Github markdown CSS for preview
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
@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();
}
@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 / 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 / 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 / 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 / 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 / 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".