Skip to content

Instantly share code, notes, and snippets.

View zhaocai's full-sized avatar
🤨
I may be slow to respond.

Zhao Cai zhaocai

🤨
I may be slow to respond.
View GitHub Profile
{'Fb': {'word': 'Fb', 'options': {'word': 0, 'indent': 0, 'head': 0}, 'snip': 'Factory.build(:${1:factory})${2}', 'description': 'Factory.build(:${1:factory})${2}', 'action__path': '/Users/zhaocai/.vim/bundle/neco-snip/snip/ruby/factory_girl.snip', 'action__line': 24, 'menu_template': '[nsnip] Factory.build(:${1:factory})${2}', 'real_name': 'Fb', 'action__pattern': '^snippet\s\+Fb$', 'menu_abbr': 'Factory.build(:${1:factory})${2}'}, 'yD': {'word': 'yD', 'options': {'word': 0, 'indent': 0, 'head': 1}, 'snip': 'File.open(${1:TARGET}, "wb") { |f| YAML::dump(${2:object}, f)}', 'description': 'File.open(${1:TARGET}, "wb") { |f| YAML::dump(${2:object}, f)}', 'action__path': '/Users/zhaocai/.vim/bundle/neco-snip/snip/ruby/ruby.snip', 'action__line': 455, 'menu_template': '[nsnip] File.open(${1: }, "wb") { |f| YAML::dump(${2:object}, f)}', 'real_name': 'yamlDump', 'action__pattern': '^snippet\s\+yamlDump$', 'menu_abbr': 'File.open(${1: }, "wb") { |f| YAML::dump(${2:object}, f)}'}, 'Fd': {'word': 'Fd', 'options': {'wo
# #!/usr/bin/ruby
# -- env -- [[[1 -------------------------------------------------------------
snippet shebang
abbr #!/usr/bin/env ruby
prev_word '^'
#!/usr/bin/env ${1:ruby}
# -*- coding: utf-8 -*-
${2}
set nocompatible
let $VIMHOME = $HOME . '/.vim'
set runtimepath=$VIMRUNTIME,$VIMHOME,$VIMHOME/after
let g:bundle_home = expand($VIMHOME . '/bundle')
if has('vim_starting')
exec 'set runtimepath+=' . g:bundle_home . '/neobundle.vim/'
endif
@zhaocai
zhaocai / cprofile.sh
Created September 25, 2013 19:09
py` PythonSpeed/PerformanceTips - Python Wiki
python -m cProfile -s time mine.py <args>
From 9dfbbe18f2e84da649f28dc1a3b06935ac0e3b17 Mon Sep 17 00:00:00 2001
From: Zhao Cai <[email protected]>
Date: Wed, 31 Jul 2013 16:43:01 -0400
Subject: [PATCH] Add QueryPartialMatch to ycm_core
---
cpp/ycm/PythonSupport.cpp | 43 +++++++++++++++++++++++++++++++++++++++++++
cpp/ycm/PythonSupport.h | 11 +++++++++++
cpp/ycm/ycm_core.cpp | 1 +
3 files changed, 55 insertions(+)
From 8c376bdb5e6d22ab56044bd07f4f631eaa40855d Mon Sep 17 00:00:00 2001
From: Zhao Cai <[email protected]>
Date: Sun, 27 Oct 2013 22:05:23 -0400
Subject: [PATCH] Disable "Pattern not found" message unless verbose > 0
---
src/edit.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/edit.c b/src/edit.c
<#
.Synopsis
Displays a visual representation of a calendar.
.Description
Displays a visual representation of a calendar. This function supports multiple months
and lets you highlight specific date ranges or days.
.Parameter Start
The first month to display.
; WINDOWS KEY + Y TOGGLES FILE EXTENSIONS
#y::
RegRead, HiddenFiles_Status, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, HideFileExt
If HiddenFiles_Status = 1
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, HideFileExt, 0
Else
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, HideFileExt, 1
WinGetClass, eh_Class,A
If (eh_Class = "#32770" OR A_OSVersion = "WIN_VISTA")
send, {F5}
@zhaocai
zhaocai / .remarkrc.yaml
Created August 28, 2016 21:21
remark rc config
---
plugins:
remark-lint:
blockquote-indentation: 2
final-newline: true
hard-break-spaces: true
list-item-bullet-indent: true
list-item-indent: 'tab-size'
maximum-line-length: false
no-auto-link-without-protocol: true
@zhaocai
zhaocai / cVim Alfred Style.css
Created September 7, 2016 01:47
cVim Options
#cVim-link-container, .cVim-link-hint, #cVim-command-bar, #cVim-command-bar-mode, #cVim-command-bar-input, #cVim-command-bar-search-results, .cVim-completion-item, .cVim-completion-item .cVim-full, .cVim-completion-item .cVim-left, .cVim-completion-item .cVim-right, #cVim-hud, #cVim-status-bar {
font-family: Helvetica, Helvetica Neue, Neue, sans-serif, Arial;
font-size: 9pt !important;
-webkit-font-smoothing: antialiased !important;
border-radius: 4px!important;
}
#cVim-link-container {
position: absolute;
pointer-events: none;