Skip to content

Instantly share code, notes, and snippets.

View wfxr's full-sized avatar
☃️
I may be slow to respond.

Wenxuan wfxr

☃️
I may be slow to respond.
  • ::1
  • Nauvis
View GitHub Profile
@wfxr
wfxr / github-release-download.sh
Created July 24, 2017 08:16
从Github上面下载最新的Release包
# eg: download exa
curl -s https://api.github.com/repos/ogham/exa/releases/latest | grep browser_download_url | grep linux | cut -d'"' -f4
We couldn’t find that file to show.
@wfxr
wfxr / odps.md
Last active July 13, 2017 02:26
阿里云ODPS操作

match md5imei

insert overwrite table tmp_bid_log_join_result select * from tmp_bid_log left outer join tmp_all_md5imei on tmp_bid_log.md5imei = tmp_all_md5imei.md5imei;

batch upload (ignore dirty data)

tunnel upload /data/bid_log/baseinfo/2017/07/11/parsed/ tmp_bid_log -fd " " -dbr=true;
@wfxr
wfxr / cvimrc
Last active July 29, 2017 01:56
cvim config file
set autoupdategist
set noautofocus
set smoothscroll
set hud
set noregex
set noinsertmappings
set typelinkhints
set defaultnewtabpage
set cncpcompletion
let scrollduration = 10
@wfxr
wfxr / vim-tricks.md
Created May 4, 2017 16:10
vim技巧

执行命令并退出

$ vim +PlugInstall +qall
@wfxr
wfxr / pip_redirect
Created May 2, 2017 03:16
Linux重定向命令介绍
see: https://unix.stackexchange.com/a/70971
2>&-
The general form of this one is M>&-, where "M" is a file descriptor number. This will close output for whichever file descriptor is referenced, i.e. "M".
2>/dev/null
The general form of this one is M>/dev/null, where "M" is a file descriptor number. This will redirect the file descriptor, "M", to /dev/null.
@wfxr
wfxr / wenxuan.iterm2.plist
Last active April 12, 2017 14:42
iTerm2 配置文件
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AppleAntiAliasingThreshold</key>
<integer>1</integer>
<key>AppleScrollAnimationEnabled</key>
<integer>0</integer>
<key>AppleSmoothFixedFontsSizeThreshold</key>
<integer>1</integer>
@wfxr
wfxr / fix-vim-clipboard-under-tmux
Created April 11, 2017 04:17
修复tmux中vim和系统共享剪贴板出错的问题
ref: https://github.com/tmux/tmux/issues/543
I was experiencing the same issues post-upgrade, but finally got it working again this morning.
Here's what I did:
brew install reattach-to-user-namespace
Ensure the following is set in .tmux.conf:
set -g default-shell $SHELL
@wfxr
wfxr / remove-last-6-rows.sh
Last active April 11, 2017 03:56
删除文件的最后6行
tac filename | sed '1,6d' | tac > filename
# or
tail -r filename | sed '1,6d' | tail -r > filename
# or
head -n -6 filename > filename # not work on osx
@wfxr
wfxr / benchmark.java
Created April 4, 2017 14:19
Java benchmark util.
package com.zmeng.rinascimento.pascal.common.testutil;
import java.util.function.Supplier;
import static java.lang.System.currentTimeMillis;
/**
* Created by Wenxuan-Zhang on 2017/3/20.
* Email: [email protected]
*/