Skip to content

Instantly share code, notes, and snippets.

Avatar

尹良灿 wenLiangcan

  • China
View GitHub Profile
View .gtkrc-2.0
#Create a new file in your home directory called .gtkrc-eclipse
# call eclipse with this command:
# env GTK2_RC_FILES=/usr/share/themes/Clearlooks/gtk-2.0/gtkrc:/home/USER/.gtkrc-eclipse '/path_to_eclipse/eclipse'
# env GTK2_RC_FILES=/home/wheely/.themes/Siva/gtk-2.0/gtkrc:/home/wheely/.gtkrc-eclipse '/usr/bin/eclipse'
# In your Eclipse directory find the file 'plugins/org.eclipse.platform_4.2.*/css/e4_default_gtk.css'
# (there's an * in there, because I guess that the version may change in the future or may be different already).
# In this file there's a CSS class:
@wenLiangcan
wenLiangcan / get_douban_album_pic.py
Last active Jan 3, 2018
下载豆瓣相册图片
View get_douban_album_pic.py
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Filename: get_douban_album_pic.py
import urllib2, re, os, sys
from os.path import basename
from urlparse import urlsplit
def fetch(url):
try:
View correct-image-file-extension.py
#!/usr/bin/python
import os, sys, imghdr
if len(sys.argv) == 2:
try:
os.chdir(sys.argv[1])
except OSError, e:
if e.errno == 2:
print "No such file or directory: '%s'" % sys.argv[1]
View get_tieba_pic.py
#!/usr/bin/python
# Filename: get_tieba_pic.py
from __future__ import print_function
import os
import re
import sys
if sys.version_info[0] == 2:
View adhoc
#!/bin/bash
#####################################
#Author: Leon Lee #
#email: lendylongli@gmail.com #
#QQ: 730395591 #
#Version: 1.0 #
#Note: If you have some good ideas #
# or advice, please mail me^^ #
#####################################
@wenLiangcan
wenLiangcan / face.txt
Created Aug 3, 2013
恶搞版大泡泡
View face.txt
{"url":"http://imgsrc.baidu.com/forum/w%3D580/sign=1fc349e10ef41bd5da53e8fc61d881a0/0b55b319ebc4b745217419dccffc1e178b821513.jpg","facePackage":"恶搞版大泡泡"},{"url":"http://imgsrc.baidu.com/forum/w%3D580/sign=6a29802fad6eddc426e7b4f309d9b6a2/eac4b74543a98226ab2185ed8a82b9014b90eb1c.jpg","facePackage":"恶搞版大泡泡"},{"url":"http://imgsrc.baidu.com/forum/w%3D580/sign=fe7ec901b2fb43161a1f7a7210a54642/3bf33a87e950352a054f8cc25343fbf2b3118bca.jpg","facePackage":"恶搞版大泡泡"},{"url":"http://imgsrc.baidu.com/forum/w%3D580/sign=ea16ddd909f79052ef1f47363cf1d738/5243fbf2b21193137acc517a65380cd790238d69.jpg","facePackage":"恶搞版大泡泡"},{"url":"http://imgsrc.baidu.com/forum/w%3D580/sign=84389d133901213fcf334ed464e636f8/dc54564e9258d109baf60078d158ccbf6d814de6.jpg","facePackage":"恶搞版大泡泡"},{"url":"http://imgsrc.baidu.com/forum/w%3D580/sign=05b70cf0304e251fe2f7e4f09787c9c2/5366d0160924ab18d3a84ffd35fae6cd7a890bb9.jpg","facePackage":"恶搞版大泡泡"},{"url":"http://imgsrc.baidu.com/forum/w%3D580/sign=e7eb0025f2d3572c66e29cd4ba126352/1b4c510fd9f9d72a
View 大泡泡.txt
{"url":"http://hiphotos.baidu.com/harvey7/pic/item/a5a0b7115aafa40f001d6745ab64034f79f01936.jpg","facePackage":"大泡泡"},{"url":"http://hiphotos.baidu.com/harvey7/pic/item/9dabcefeab64034f37166b9eafc379310b551d36.jpg","facePackage":"大泡泡"},{"url":"http://hiphotos.baidu.com/harvey7/pic/item/044b3be71bd5ad6ef2c1cc7281cb39dbb7fd3cd5.jpg","facePackage":"大泡泡"},{"url":"http://hiphotos.baidu.com/harvey7/pic/item/dc8157caf2d3572c902a35448a13632760d0c3c6.jpg","facePackage":"大泡泡"},{"url":"http://hiphotos.baidu.com/harvey7/pic/item/c78f9cff8a136327e7256bab918fa0ec0afac7c6.jpg","facePackage":"大泡泡"},{"url":"http://hiphotos.baidu.com/harvey7/pic/item/7d48a238d40735faddc8e6219e510fb30e2408d5.jpg","facePackage":"大泡泡"},{"url":"http://hiphotos.baidu.com/harvey7/pic/item/4ad2e44bccbf6c81830c8470bc3eb13532fa40d6.jpg","facePackage":"大泡泡"},{"url":"http://hiphotos.baidu.com/harvey7/pic/item/654cb212a18b87d648810287070828381d30fdcf.jpg","facePackage":"大泡泡"},{"url":"http://hiphotos.baidu.com/harvey7/pic/item/417be11435fae6cd466e02f90fb30
@wenLiangcan
wenLiangcan / huaban.py
Last active Feb 19, 2019
批量获取花瓣网画板大图地址
View huaban.py
#!/usr/bin/python
# Filename: huaban.py
import urllib2,re,sys,os
reload(sys)
sys.setdefaultencoding('utf-8')
def get_pic():
pin_id = None
limit = '20'
View dft.py
# Example usage
# $ python dft.py | gnuplot
# 9
# 0 0
# 1 1
# 2 2
# 0 2
# 1 1
# -1 1
# 0 2
View autocomplete.match.pair.vim
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)
You can’t perform that action at this time.