Skip to content

Instantly share code, notes, and snippets.

View liuzhe0223's full-sized avatar
🎯
Focusing

Liu Zhe liuzhe0223

🎯
Focusing
View GitHub Profile
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
Bundle 'rails.vim'
Bundle 'c.vim'
Bundle 'python.vim'
"Bundle 'https://github.com/ervandew/supertab.git'
Bundle 'git://github.com/scrooloose/nerdtree.git'
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
# Pw @ 2013-06-22 19:56:30
class Test:
def count(self,n):
while n > 0:
yield n
@liuzhe0223
liuzhe0223 / upload_image.py
Created June 25, 2013 11:08
用于上传图片到 https://api.imgur.com , 返回图片url, 论坛发图片用的
#!/usr/bin/python2
import urllib2
import urllib
import sys
import json
try:
data = file(sys.argv[1], 'r').read()
except:
@liuzhe0223
liuzhe0223 / threadpool.py
Created August 8, 2013 13:36
python的一个线程池, 我自认为是java风格的
#!/usr/bin/env python
#coding:utf-8
import threading
from Queue import Queue
class ThreadPool(threading.Thread):
@liuzhe0223
liuzhe0223 / fetch_category_web.go
Last active December 23, 2015 08:09
获取 http://www.dmozdir.org 上分类好的域名
/*
author: liuzhe
purpose: get classified domains from www.dmozdir.org
*/
package main
import (
"net/http"
"fmt"
@liuzhe0223
liuzhe0223 / login.py
Created September 24, 2013 12:21
自动登录 Discuz! 3.x 发帖
#coding:utf-8
import time
import requests
from pyquery import PyQuery as pq
if __name__ == "__main__":
host = "http://www.ytbbs.com/"
loggin_url = ''.join([host, 'member.php'])
package main
import (
"github.com/codegangsta/martini"
"github.com/martini-contrib/binding"
"github.com/martini-contrib/encoder"
"labix.org/v2/mgo"
"labix.org/v2/mgo/bson"
"net/http"
"time"
// Generated on 2014-03-14 using generator-angular 0.7.1
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
module.exports = function (grunt) {
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
"Bundle 'c.vim'
Bundle 'go.vim'
Bundle 'python.vim'
Bundle 'https://github.com/msanders/snipmate.vim.git'
Bundle 'vim-ruby/vim-ruby'
package main
import (
"fmt"
"reflect"
)
type A struct {
}