Skip to content

Instantly share code, notes, and snippets.

@wenLiangcan
wenLiangcan / .ctags
Last active August 29, 2015 14:07 — forked from chase/.ctags
--langdef=moonscript
--langmap=moonscript:.moon
--regex-moonscript=/(^|=[ \t])*class ([A-Za-z_][A-Za-z0-9_]+\.)*([A-Za-z_][A-Za-z0-9_]+)( extends ([A-Za-z][A-Za-z0-9_.]*)+)?$/\3/c,class/
--regex-moonscript=/^[ \t]*@?(([A-Za-z][A-Za-z0-9_.]*)+):.*[-=]>.*$/\1/m,method/
--regex-moonscript=/^[ \t]*(([A-Za-z][A-Za-z0-9_.]*)+)[ \t]*=.*[-=]>.*$/\1/f,function/
--regex-moonscript=/^[ \t]*(([A-Za-z][A-Za-z0-9_.]*)+)[ \t]*=[^->\n]*$/\1/v,variable/
--regex-moonscript=/^[ \t]*@(([A-Za-z][A-Za-z0-9_.]*)+)[ \t]*=[^->\n]*$/\1/p,property/
--regex-moonscript=/^[ \t]*@(([A-Za-z][A-Za-z0-9_.]*)+):[^->\n]*$/\1/s,static property/
--regex-moonscript=/^[ \t]*(([A-Za-z][A-Za-z0-9_.]*)+):[^->\n]*$/\1/p,property/
--regex-moonscript=/(new:[ \t]*\()@(([A-Za-z][A-Za-z0-9_.]*)+)([ \t]*=[ \t]*[^,)]+)?/\3/p,property/
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Directory\Background\shell\Cmder]
[-HKEY_CLASSES_ROOT\Directory\shell\Cmder]
import requests
from db import db
"""
The Douban Group API which not display on http://developers.douban.com/wiki/?title=api_v2
Base url: https://api.douban.com/v2
Group info: /group/:id
@wenLiangcan
wenLiangcan / cmds.txt
Last active August 29, 2015 14:21 — forked from wong2/cmds.txt
在 Android 微信 6.1+ 任意聊天窗口中输入。 [ ]表示后面要跟一个空格(可能还需要别的参数才能生效)
//wearversion
//wearlog
//wearvoiceinputenable
//wearvoiceinputdisable
//weargoogleapi
//assert
//pushassert
//uplog
//upcrash
//switchnotificationstatus
@wenLiangcan
wenLiangcan / MainActivity.java
Last active August 29, 2015 14:22 — forked from slightfoot/MainActivity.java
ContextMenu's in Fragments within a ViewPager
import java.util.ArrayList;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.app.ListFragment;
import android.support.v4.view.ViewPager;
import android.view.ContextMenu;
@wenLiangcan
wenLiangcan / gist:3847913
Created October 7, 2012 11:18 — forked from asuna/gist:3847888
书签栏悬停
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
#PersonalToolbar{
position:fixed;
margin-top:45px !important;
border:1px solid #BBB !important;
visibility:hidden !important;
opacity:0;
-moz-transition-property: margin,opacity;
-moz-transition-duration: 0.5s;
-moz-transition-delay: 0s;
@wenLiangcan
wenLiangcan / tieba(各种修改).css
Created October 10, 2012 09:14 — forked from anonymous/tieba
新版贴吧宽屏主题 Noe132灰色样式个人修改版
@namespace url(http://www.w3.org/1999/xhtml);
/*签到栏标题*/
.sign_title_text2::before{
position:absolute;
content:"签签更健康";
font-weight:bold;
font-size:13px;
text-shadow:1px 1px gray;
color:white;
@wenLiangcan
wenLiangcan / Custom.css
Created October 18, 2012 13:56 — forked from bentruyman/Custom.css
IR_Black Theme for Chrome Developer Tools
/**********************************************/
/*
/* IR_Black Skin by Ben Truyman - 2011
/*
/* Based on Todd Werth's IR_Black:
/* http://blog.toddwerth.com/entries/2
/*
/* Inspired by Darcy Clarke's blog post:
/* http://darcyclarke.me/design/skin-your-chrome-inspector/
/*
@wenLiangcan
wenLiangcan / gist:3927151
Created October 21, 2012 14:39
新浪微博图床小书签
javascript:void(function(){var%20d%20=%20document,a%20=%20'setAttribute',s%20=%20d.createElement('script');s[a]('tyle','text/javascript');s[a]('src','http://pastebin.com/raw.php?i=vH98htiN');d.head.appendChild(s);})();
@wenLiangcan
wenLiangcan / lolcat.py
Last active November 10, 2015 01:17 — forked from lilydjwg/lolcat.py
#!/usr/bin/env python3
# inspired by https://github.com/busyloop/lolcat
import sys
import re
import os
from math import ceil
from colorsys import hsv_to_rgb
from unicodedata import east_asian_width