Skip to content

Instantly share code, notes, and snippets.

Avatar

尹良灿 wenLiangcan

  • China
View GitHub Profile
@wenLiangcan
wenLiangcan / M.bmp.py
Last active Aug 1, 2019
来自网络: 先将这个代码复制,粘帖为文本,然后改名字,文件后缀为 M.bmp 然后在终端执行$python M.bmp 不要关闭终端,他会根据你的机器配置在你的主文件夹里生成m.bmp(1500x1000)图片。
View M.bmp.py
_ = (
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
@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'
@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 Monaco for Powerline.md

Powerline-patched Monaco for Windows and OSX

This font is manually patched with Fontforge. It includes the glyphs from DejaVu Sans Mono for Powerline.

I recommend DirectWrite-patched VIM builds. I'm using KaoriYa's build (http://www.kaoriya.net/software/vim/)

Usage

Add the following lines to your .vimrc/_vimrc:

@wenLiangcan
wenLiangcan / ie.html
Created Jan 6, 2013
ie9-ie10去广告方案
View ie.html
<h1>Internet Explorer 10 Adblock Tracking Protection Lists!</h1>
<br>
<br>
<br>
<br>
adblockplus:<a href="javascript:window.external.msAddTrackingProtectionList('http://easylist-msie.adblockplus.org/chinalist+easylist.tpl', 'ChinaList+EasyList')">ChinaList+EasyList</a>
<br>
<br>
adblockplus:<a href="javascript:window.external.msAddTrackingProtectionList('http://easylist-msie.adblockplus.org/easylist.tpl', 'EasyList')">EasyList</a>
<br>
View OpenWithSublimeTextAsAdmin.bat
@echo off
@rem ==================
@rem Source:
@rem https://gist.github.com/jcppkkk/8330314
@rem Description:
@rem Install context menu to allow user opens file with Sublime Text as User or Admin, or Open Folder with Sublime Text.
@rem Usage:
@rem Download this .bat file to in Sublime Text's installation folder.
@rem Execute this batch file. It will download elevate codes and setup context menu.
@rem ==================
@wenLiangcan
wenLiangcan / download_zeal_user_docsets.py
Last active Mar 21, 2016 — forked from crmne/download_zeal_user_docsets.py
A solution to the lack of UI for Dash's user docsets in Zeal. Uses Python 3 and easygui (pip3 install easygui)
View download_zeal_user_docsets.py
import json
import os
import tarfile
import urllib.request
import configparser
import easygui
user_docsets_url = 'https://dashes-to-dashes.herokuapp.com/docsets/contrib'
app_title = 'Download Zeal user docsets'
@wenLiangcan
wenLiangcan / PKGBUILD
Last active Jan 31, 2016
Arch Linux packaging scripts for timxx/xmradio
View PKGBUILD
# Maintainer: Vic Luo <vicluo96@gmail.com>
pkgname=xmradio-git
pkgver=0.5.1.14.ga5187cc
pkgrel=1
pkgdesc="xmradio is a tiny Internet Xia Mi Radio client for Linux, which supports many radio style, skin builtin and many other features."
arch=('x86_64' 'i686')
url="https://github.com/timxx/xmradio"
license=('GPL3')
depends=('dbus' 'vlc')
View gofmt error
//测试代码
package test
import "fmt"
func main()
{
fmt.Printf("test\n")
}
View github_git_protocol.user.js
// ==UserScript==
// @name github_git_protocol
// @namespace http://tieba.baidu.com/home/main?un=%B9%C8%B8%E7%CE%C0%CA%BF&fr=pb
// @author googleGuard
// @version 1.0
// @include https://github.com/*
// @run-at document-end
// @grant none
// ==/UserScript==
(function(f) {
You can’t perform that action at this time.