Skip to content

Instantly share code, notes, and snippets.

if __name__ == "__main__":
print 'hello gist'
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>the5fire-backbone-model</title>
</head>
<body>
</body>
<script src="http://backbonejs.org/test/vendor/jquery.js"></script>
1. 写入中文
2. 背景透明
3. 尺寸设置
4. 添加水印
# coding:utf-8
import requests
listurl = "http://www.xs8.cn/shuku/c0-t0-f0-w0-u0-o0-1-0.html"
headers = {
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'Accept-Encoding': 'gzip,deflate,sdch',
'Accept-Language': 'zh-CN,zh;q=0.8,en-US;q=0.6,en;q=0.4',
<!DOCTYPE html>
<html>
<head>
<title>the5fire-backbone-router</title>
</head>
<body>
<a href="#/posts/120">Post 120</a>
<a href="#/download/user/images/hey.gif">download gif</a>
<a href="#/dashboard/graph">Load Route/Action View</a>
<script src="jquery.js"></script>
"""
client.py - AsyncIO Server using StreamReader and StreamWriter
This will create 200 client connections to a server running server.py
It will handshake and run similar to this:
Server: HELLO
Client: WORLD
#!/bin/zsh
# pyenv install for CentOS 6.5 x86_64
yum install -y gcc gcc-c++ make git patch openssl-devel zlib-devel readline-devel sqlite-devel bzip2-devel
git clone git://github.com/yyuu/pyenv.git ~/.pyenv
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
@the5fire
the5fire / deepin_grub.cfg
Created May 6, 2014 10:39
install deepin2014 grub conf
menuentry 'install deepin2014' {
set root=(hd0,7)
linux /install_deepin/vmlinuz.efi boot=casper noacpi iso-scan/filename=/install_deepin/deepin_2014_alpha_zh-hans_amd64.iso ro quiet splash locale=zh_CN.UTF-8 noprompt --
initrd /install_deepin/initrd.lz
}
@the5fire
the5fire / cp_lang.py
Created May 8, 2014 03:16
cp lang dir
import os
import shutil
l = "ar, bg, bn, br, bs, ca, ckb, cs, csb, cy, da, de, el, en, en_AU, en_CA, en_GB, eo, es, et, eu, fa, fi, fil, fo, fr, fy, ga, gl, gu, he, hi, hr, hu, id, is, it, ja, ka, kk, ko, ku, lt, lv, mk, ml, mr, ms, nb, nds, ne, nl, nn, oc, pa, pl, pt, pt_BR, ro, ru, si, sk, sl, sq, sr, sv, ta, te, th, tl, tr, uk, ur, vi, zh_CN, zh_HK, zh_TW, zu"
for la in l.split(', '):
la = la.strip()
if not os.path.exists(la):
shutil.copytree('gl', la)
@the5fire
the5fire / color.js
Last active August 29, 2015 14:04
color
//http://wbpkh5001.17c.cn/html5/
function clock(){
var color_map = {};
var unfound = true;
var children = $('#box').children();
var i = 0;
$.each(children, function(i, item){
var key = $(item).attr('style');
var nextkey = $(children[i+1]).attr('style');
var v = color_map[key];