Skip to content

Instantly share code, notes, and snippets.

Avatar

尹良灿 wenLiangcan

  • China
View GitHub Profile
View .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/
View ContextCmder-Disable.reg
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Directory\Background\shell\Cmder]
[-HKEY_CLASSES_ROOT\Directory\shell\Cmder]
View doubangroupapi.py
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 Aug 29, 2015 — forked from wong2/cmds.txt
在 Android 微信 6.1+ 任意聊天窗口中输入。 [ ]表示后面要跟一个空格(可能还需要别的参数才能生效)
View cmds.txt
//wearversion
//wearlog
//wearvoiceinputenable
//wearvoiceinputdisable
//weargoogleapi
//assert
//pushassert
//uplog
//upcrash
//switchnotificationstatus
@wenLiangcan
wenLiangcan / MainActivity.java
Last active Aug 29, 2015 — forked from slightfoot/MainActivity.java
ContextMenu's in Fragments within a ViewPager
View MainActivity.java
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 Oct 7, 2012 — forked from asuna/gist:3847888
书签栏悬停
View gist:3847913
@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 Oct 10, 2012 — forked from anonymous/tieba
新版贴吧宽屏主题 Noe132灰色样式个人修改版
View tieba(各种修改).css
@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 Oct 18, 2012 — forked from bentruyman/Custom.css
IR_Black Theme for Chrome Developer Tools
View Custom.css
/**********************************************/
/*
/* 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 Oct 21, 2012
新浪微博图床小书签
View gist:3927151
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);})();
View 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