RHEL 7 发布应该算是比较大的新闻了吧~
人民群众纷纷表示红帽步子太大不要扯着蛋了比较好...
F_XZ: 完全没关心...
猫注意的新功能有 virtio 等 KVM 优化, docker 支持, 以及 ruby 2.0, python 2.7, java 7 之类的吧
############################################################################### | |
# The MIT License | |
# | |
# Copyright 2012-2014 Jakub Jirutka <jakub@jirutka.cz>. | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is |
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript"> | |
// require.js | |
this.require || this.define || (function() { | |
var head = document.getElementsByTagName("head")[0], | |
iModules = {}, | |
oModules = {}; |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
try: | |
import urllib.parse as urllib_parse # py3 | |
except ImportError: | |
import urllib as urllib_parse # py2 | |
import tornado |
var list = new Array("Bulgaria", "93.123.23.1/59", | |
"Egypt", "197.199.253.1/59", | |
"Egypt", "197.199.254.1/59", | |
"Hong Kong", "218.189.25.129/187", | |
"Hong Kong", "218.253.0.76/92", "218.253.0.140/187", | |
"Iceland", "149.126.86.1/59", | |
"Indonesia", "111.92.162.4/6", "111.92.162.12/59", | |
"Iraq", "62.201.216.196/251", | |
"Japan", "218.176.242.4/251", | |
"Kenya", "41.84.159.12/30", |
this.require || function(global, undefined) { | |
/** | |
require | |
var module = require("ModuleName"); | |
*/ | |
function require(a) { | |
if (!exported[a]) { | |
rec("loader.require", "Required", a); | |
var b, c = installed[a]; |
#!/usr/bin/env python | |
""" | |
How to use it: | |
1. Just `kill -2 PROCESS_ID` or `kill -15 PROCESS_ID` , The Tornado Web Server Will shutdown after process all the request. | |
2. When you run it behind Nginx, it can graceful reboot your production server. | |
3. Nice Print in http://weibo.com/1682780325/zgkb7g8k7 | |
""" |
/* | |
可以实现: | |
1. 选择区域截图 | |
2. 可视区域截图 | |
3. 整张网页截图 | |
*/ | |
var screenshot = { | |
tab: 0, |
""" | |
Contains reCaptcha fields for WTForms which can be used | |
for various forms. This library depends on `recaptcha-client` ~> 1.0.6. | |
Example usage is below. | |
Defining a form with a ``RecaptchaField``: | |
from wtforms import Form | |
from recaptcha_field import RecaptchaField |
""" | |
http://saepy.sinaapp.com/topic/24/Tornado%E4%B8%8A%E4%BC%A0%E6%96%87%E4%BB%B6%E7%A4%BA%E4%BE%8B | |
在bcore的开发过程中,涉及到上传文件有两个地方,一个是相册,一个是文章图文混排。这里作为一个备忘。罗列一些关键点: | |
文件上传的内容体在tornado.web.RequestHandler.request.files属性中,并且是以数组形式存放的。 | |
使用临时文件存储时,在write完成后要记着把seek重置到文件头。要不然文件无法被读取。 | |
再使用Image模块的thumbnail方法进行缩放时,resample=1作为重载渲染参数能够有效的使图片平滑,消除锯齿。 |