Skip to content

Instantly share code, notes, and snippets.

View Echostream's full-sized avatar
🙃
dizzy

NickOne Echostream

🙃
dizzy
View GitHub Profile
@Echostream
Echostream / brew_thrift
Last active January 13, 2021 03:24
install thrift0.11.0 by brew
# [brew install URL] will fail with message
# "Invalid usage: Installation of thrift from a GitHub commit URL is unsupported! "
# But it will succeed if download the thrift.rb at first
wget https://raw.githubusercontent.com/Homebrew/homebrew-core/4ba654c6d99b3b6804dd3843546a9dcbb700188b/Formula/thrift.rb \
-O ~/Downloads/thrift.rb
brew install ~/Downloads/thrift.rb
brew pin thrift
thrift --version # show "Thrift version 0.11.0"
[
{ "keys": ["g","w"], "command": "find_under_expand" },
{ "keys": ["g", "s"], "command": "find_under_expand_skip" },
]
{
"ignored_packages": [],
"vintage_ctrl_keys": true
}
@Echostream
Echostream / cvimrc
Last active August 18, 2019 09:29
chrome cvim vimrc
set smoothscroll
unmap a
map ag :tabnew google<space>
let searchengine b = "https://www.baidu.com/s?wd=%s"
let searchengine d = "http://dict.youdao.com/w/eng/%s"
let searchengine w = "https://en.wikipedia.org/w/index.php?search=%s"
let completionengines = ["google", "baidu"]
map an :tabnew https://www.evernote.com/Home.action<CR>
unmap I
map I :history!<space>
@Echostream
Echostream / zsh-bash-keybind
Created May 25, 2016 07:05
show the bindkey
Show keybinding in current shell
bash: bind -p
zsh: bindkey -L
@Echostream
Echostream / .tmux.conf
Last active June 21, 2016 16:57
Enable mouse actions in tmux 2.1
set -g mouse on
set -g mouse-utf8 on
bind -n WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
bind -n WheelDownPane select-pane -t= \; send-keys -M
bind -n C-WheelUpPane select-pane -t= \; copy-mode -e \; send-keys -M
#Press Ctral for scrolling faster
bind -t vi-copy C-WheelUpPane halfpage-up
bind -t vi-copy C-WheelDownPane halfpage-down
bind -t emacs-copy C-WheelUpPane halfpage-up
bind -t emacs-copy C-WheelDownPane halfpage-down
@Echostream
Echostream / SurfingKeys.js
Last active July 7, 2016 18:11
Enable gi to focus the first text box on the whole web page by SurfingKeys
mapkey('gi', 'test', function() {
var inputs = document.getElementsByTagName('input');
var input = null;
for(var i=0; i<inputs.length; i++) {
if(inputs[i].type=='text') {
input = inputs[i];
break;
}
}
if(input) {