Skip to content

Instantly share code, notes, and snippets.

inoremap ( <c-r>=OpenPair('(')<CR>
inoremap ) <c-r>=ClosePair(')')<CR>
inoremap { <c-r>=OpenPair('{')<CR>
inoremap } <c-r>=ClosePair('}')<CR>
inoremap [ <c-r>=OpenPair('[')<CR>
inoremap ] <c-r>=ClosePair(']')<CR>
" just for xml document, but need not for now.
"inoremap < <c-r>=OpenPair('<')<CR>
"inoremap > <c-r>=ClosePair('>')<CR>
function! OpenPair(char)
# Rime table
# coding: utf-8
#@/db_name custom_phrase.txt
#@/db_type tabledb
#
# 用於【朙月拼音】系列輸入方案
# 【小狼毫】0.9.21 以上
#
# 請將該文件以UTF-8編碼保存爲
# Rime用戶文件夾/custom_phrase.txt
@wenLiangcan
wenLiangcan / f.css
Created March 17, 2013 12:05
feedly样式 只是把84468和84527这两个样式合并在了一起
@-moz-document domain("feedly.com") {
div#feedlyFrame { width : 98% !important;}
div#feedlyPart { width : 98% !important;}
div#feedlyPage, div#mainArea { width: 100% !important;}
div#sideArea
{ display: none !important; }
.entryHolder {
width:100% !important;
max-width: 100% !important;
@wenLiangcan
wenLiangcan / bditor
Created January 30, 2013 06:48
changes the background color as you type from:https://coderwall.com/p/lhsrcq
data:text/html, <html><head><link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'><style type="text/css"> html { font-family: "Open Sans" } * { -webkit-transition: all linear 1s; }</style><script>window.onload=function(){var e=false;var t=0;setInterval(function(){if(!e){t=Math.round(Math.max(0,t-Math.max(t/3,1)))}var n=(255-t*2).toString(16);document.body.style.backgroundColor="#ff"+n+""+n},1e3);var n=null;document.onkeydown=function(){t=Math.min(128,t+2);e=true;clearTimeout(n);n=setTimeout(function(){e=false},1500)}}</script></head><body contenteditable style="font-size:2rem;line-height:1.4;max-width:60rem;margin:0 auto;padding:4rem;">
@wenLiangcan
wenLiangcan / huaban.py
Created December 28, 2012 05:14 — forked from amoblin/huaban.py
#!/usr/bin/env python
# -*- coding: utf8 -*-
# author: amoblin <amoblin@163.com>
import sys, re, urllib2, os, urllib
beauty_url = "http://huaban.com/favorite/beauty/"
#beauty_url = "http://huaban.com/"
pin_re = '<a href="/pins/(.+?)/"'
@wenLiangcan
wenLiangcan / gist:4362723
Last active December 10, 2015 01:48
“一个-韩寒”的rss 采集
# coding: utf-8
from google.appengine.ext import db
from google.appengine.api import urlfetch
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
import urllib, urllib2, BeautifulSoup, re, datetime
#class Conf(db.Model):
@wenLiangcan
wenLiangcan / M.bmp.py
Last active August 1, 2019 16:43
来自网络: 先将这个代码复制,粘帖为文本,然后改名字,文件后缀为 M.bmp 然后在终端执行$python M.bmp 不要关闭终端,他会根据你的机器配置在你的主文件夹里生成m.bmp(1500x1000)图片。
_ = (
255,
lambda
V ,B,c
:c and Y(V*V+B,B, c
-1)if(abs(V)<6)else
( 2+c-4*abs(V)**-0.4)/i
) ;v, x=1500,1000;C=range(v*x
);import struct;P=struct.pack;M,\
j ='<QIIHHHH',open('M.bmp','wb').write
// ==UserScript==
// @name A Part of Google Reader Demarginfier
// @namespace http://www.aintaer.com/Projects
// @description Reduces margins on the new Google Reader layout
// @include http://www.google.com/reader/view/*
// @include https://www.google.com/reader/view/*
// @include http://www.google.*/reader/view/*
// @include https://www.google.*/reader/view/*
// @version 1.4
// ==/UserScript==
@wenLiangcan
wenLiangcan / gr style.css
Created November 18, 2012 14:33
gr样式
@-moz-document url-prefix("https://www.google.com/reader"), url-prefix("http://www.google.com/reader") {
/*Google Reader Cleanup by ytzong*/
/* top */
#gbqfbw{display:none !important}
/* search */
#gbq2{margin-left:0 !important;padding-top:0!important;}
#gbq{width:auto !important;left:109px !important; top:5px !important;}
#viewer-top-controls{padding-right:8px !important;}
#gbqff{width:111px !important}
#gbqfq{font-size:12px !important}