Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
import re
import sys
if sys.version_info[0] == 2:
import urllib2
import urllib
import urlparse
input = raw_input
@wenLiangcan
wenLiangcan / todo.fsx
Last active November 11, 2021 16:14
todo.fsx
#r "nuget:Argu"
open System
open System.IO
open System.Text.RegularExpressions
open Argu
type TaskData = {
Note: string
}
@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
@wenLiangcan
wenLiangcan / huaban.py
Last active February 19, 2019 08:55
批量获取花瓣网画板大图地址
#!/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 January 3, 2018 07:19
下载豆瓣相册图片
#!/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:

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:

@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 March 21, 2016 21:17 — 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)
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 January 31, 2016 15:37
Arch Linux packaging scripts for timxx/xmradio
# 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')
//测试代码
package test
import "fmt"
func main()
{
fmt.Printf("test\n")
}