Skip to content

Instantly share code, notes, and snippets.

@magicshui
magicshui / pickcode.py
Last active December 10, 2015 02:38
提取网页中的code渲染成图片
#coding: utf-8
import requests
import re
from requests import *
import pyquery
from pyquery import PyQuery as pq
from lxml import etree
import urllib
import sys
reload(sys)
@magicshui
magicshui / application.coffee
Last active December 31, 2015 10:49
nested menu list
App.ApplicationRoute = Ember.Route.extend
setupController: (controller,model)->
this._super(controller,model)
controller.set('menu',App.Menu.find())
return
@magicshui
magicshui / tsji.py
Last active December 31, 2015 19:58
字数统计
#!/usr/bin/python
# -*- coding: utf-8 -*-
# 分别统计中文和英文的字数,不包括标点符号。
# Author: Pan Junyong from zopen.cn, panjy at zopen dot cn
import re
import sys
from types import StringType
import operator
import urllib2
@magicshui
magicshui / hello.md
Created March 3, 2014 15:38
使用通知

亲爱的用户, 你好!欢迎使用PingMedium!

@magicshui
magicshui / check_same_files.py
Created September 26, 2014 10:03
Check if there same images in the folder
#coding: utf-8
import os
import hashlib
my_path = os.path.dirname(os.path.abspath(__file__))+'/qrcodes'
def get_all_files_from_directory():
files = os.listdir(my_path)
return files
def caculate_file_md5(file):
@magicshui
magicshui / README.md
Last active August 29, 2015 14:12 — forked from lowstz/README.md

4 step to upadte the dev environment with docker-web

  1. Replace the user-data file on your coreos-vagrant directory.
  2. Run command: vagrant provision
  3. Run command: vagrant reload
  4. Open the docker-web site, have fun :)

btw: upgrade the coreos to latest stable version if possible. You need a vpn to complete this task, because the googleapis site was blocked in China.