Skip to content

Instantly share code, notes, and snippets.

View fanzeyi's full-sized avatar

Zeyi (Rice) Fan fanzeyi

View GitHub Profile
// ==UserScript==
// @name Reshare to Rebroadcast
// @namespace https://zr.is
// @version 0.1.1
// @description Make Douban great again!
// @author Zeyi Fan
// @match https://www.douban.com/*
// @grant none
// ==/UserScript==
// ==UserScript==
// @name Revert Reshare
// @namespace http://zr.is/
// @version 0.3.1
// @description Make Reshare Great Again!
// @author Zeyi Fan
// @match https://www.douban.com/*
// @grant GM_addStyle
// ==/UserScript==
class Hello {
constructor(foo, bar) {
this.foo = foo;
this.bar = bar;
}
otherfun() {
return 1;
}

Keybase proof

I hereby claim:

  • I am fanzeyi on github.
  • I am fanzeyi (https://keybase.io/fanzeyi) on keybase.
  • I have a public key whose fingerprint is 5B05 09B5 AF59 BBF1 2CAE B79B F9DB A8F1 81ED 79BF

To claim this, I am signing this object:

@fanzeyi
fanzeyi / .vimrc
Created December 25, 2010 09:24
vim配置文件
" VIM配置文件
" Author: Fanzeyi (fanzeyi1994[at]gmail.com)
" Last Modified Date: 2010-10-13 17:49
" 设置语言及编码
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
set enc=utf-8
" set fencs=utf-8,ucs-bom,gbk,gb18030,shift-jis,gb2312,cp936
@fanzeyi
fanzeyi / iterm.diff
Created July 15, 2016 09:19 — forked from chemzqm/iterm.diff
iterm2
diff --git a/autoload/dispatch/iterm.vim b/autoload/dispatch/iterm.vim
index 7b52012..068f95f 100644
--- a/autoload/dispatch/iterm.vim
+++ b/autoload/dispatch/iterm.vim
@@ -21,22 +21,23 @@ function! dispatch#iterm#handle(request) abort
endfunction
function! dispatch#iterm#spawn(command, request, activate) abort
- let script = dispatch#isolate([], dispatch#set_title(a:request), a:command)
+ let script = s:isolate(a:request.command)
@fanzeyi
fanzeyi / xiami_decode.js
Created April 29, 2012 15:24 — forked from dndx/xiami_decode.py
Xiami URL Decoder
function decode(loca) {
var result = [], url = "";
var line, rows, extra;
loca = loca.trim();
if(loca === "") {
return "";
}
line = Number(loca[0]);
rows = Math.floor((loca.length - 1) / line);
extra = (loca.length - 1) % line;
@fanzeyi
fanzeyi / main.go
Created July 5, 2016 08:46
A simple TCP echo server for Chrome's native messaging
package main
import (
"fmt"
"os"
"net"
"bufio"
"encoding/binary"
)
@fanzeyi
fanzeyi / 10.9.patch
Last active January 1, 2016 22:29
SDL 1.2.15 Patch for 10.9
--- ./src/video/quartz/SDL_QuartzVideo.h 2014-01-02 02:36:48.000000000 +0800
+++ ./src/video/quartz/SDL_QuartzVideo.h 2014-01-02 02:36:50.000000000 +0800
@@ -91,7 +91,9 @@
CGDirectDisplayID display; /* 0 == main display (only support single display) */
const void *mode; /* current mode of the display */
const void *save_mode; /* original mode of the display */
+#if (MAC_OS_X_VERSION_MIN_REQUIRED < 1070)
CGDirectPaletteRef palette; /* palette of an 8-bit display */
+#endif
NSOpenGLContext *gl_context; /* OpenGL rendering context */
@fanzeyi
fanzeyi / .vimrc
Last active December 21, 2015 15:19
" Zeray Rice's New Vimrc
" Created: Augest 24, 2013
" ===============
" Vundle
" ===============
set nocompatible
filetype off