版本:Ubuntu 14.04 LTS 默认语言:English(United States)
Debian 和 Ubuntu 下对中文支持比较好的字体有: fonts-droid、ttf-wqy-zenhei 和 ttf-wqy-microhei 等,除了文泉驿系列字体外,比较流行的免费中文字体还有文鼎提供的楷体和上海宋,包名分别是: fonts-arphic-ukai 和 fonts-arphic-uming。
import sys | |
from PyQt5.QtCore import * | |
from PyQt5.QtGui import * | |
from PyQt5.Qt import Qt | |
from PyQt5.QtWidgets import * | |
class VKQLineEdit(QLineEdit): | |
def __init__(self, parent=None, name=None, mainWindowObj=None): | |
super(VKQLineEdit, self).__init__(parent) |
#!/usr/bin/env python | |
#coding=utf-8 | |
# | |
# Generate a list of dnsmasq rules with ipset for gfwlist | |
# | |
# Copyright (C) 2014 http://www.shuyz.com | |
# Ref https://code.google.com/p/autoproxy-gfwlist/wiki/Rules | |
import urllib2 | |
import re |
<html lang="en"> | |
<head> | |
<title>CodeMirror in Action</title> | |
<script src="js/vendor/jquery-1.9.1.js"></script> | |
<!-- More examples at http://codemirror.net/demo/ --> | |
<!-- add basic CodeMirror functionality --> | |
<script src="js/vendor/codemirror-4.1/lib/codemirror.js" type="text/javascript" charset="utf-8"></script> |
# Idempotent way to build a /etc/hosts file with Ansible using your Ansible hosts inventory for a source. | |
# Will include all hosts the playbook is run on. | |
# Inspired from http://xmeblog.blogspot.com/2013/06/ansible-dynamicaly-update-etchosts.html | |
- name: "Build hosts file" | |
lineinfile: dest=/etc/hosts regexp='.*{{ item }}$' line="{{ hostvars[item].ansible_default_ipv4.address }} {{item}}" state=present | |
when: hostvars[item].ansible_default_ipv4.address is defined | |
with_items: groups['all'] |