##f15 kde 桌面
###video music 加源 http://rpmfusion.org/Configuration yum -y install gstreamer-plugins-bad-free ffmpeg ffmpeg-devel lame 显卡安装失败
###install kernel
更新内核 : yum update kernel
大更新: yum update
set sw=4 ts=4 sta et sts=4 ai | |
set nu | |
set guifont=Inconsolata\ Medium\ 12 | |
syntax on | |
colorscheme slate | |
nmap <F8> :TagbarToggle<CR> |
#!/bin/bash | |
checkalive (){ | |
NODE=$1 | |
ping -c 3 $NODE>/dev/null 2>&1 | |
if [ $? -eq 0 ] | |
then | |
echo "$NODE is alive" | |
else | |
echo "$NODE is not alive" | |
fi |
#!/usr/bin/env python | |
#coding:utf-8 | |
import re | |
import sys | |
import urllib2 | |
std_headers = { | |
'User-Agent': 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101028 Firefox/3.6.12', | |
'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', | |
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', | |
'Accept-Language': 'en-us,en;q=0.5', |
#!/usr/bin/env python | |
#coding:utf-8 | |
#use example: | |
# find|python /tmp/myfind.py sth | |
# on cygwin | |
# find|python "C:\Users\user1\findtext\myfind.py" sth | |
import re |
import httplib | |
c = httplib.HTTPSConnection('localhost',8118) | |
c.set_tunnel('twitter.com',443) | |
c.request('GET','/') | |
r1 = c.getresponse() | |
print r1.status,r1.reason | |
data1 = r1.read() | |
print len(data1) |
# quoted from http://www.wkoorts.com/wkblog/2008/10/27/python-proxy-client-connections-requiring-authentication-using-urllib2-proxyhandler/ | |
# urllib2_proxy_handler.py | |
# | |
# Author: Wayne Koorts | |
# Date: 27/10/2008 | |
# | |
# Example for using urllib2.urlopen() with a proxy server requiring authentication | |
import urllib2 | |
#coding:utf-8 | |
suffix_list = ['.cpp','.c','.h','.hpp','.txt','.html','.htm','.xml','.py'] | |
def FoundInvalidFile(input_folder):#str,list | |
def calc_bom(str1): | |
rt = '' | |
for i in range(0,3): | |
rt += '%02X'%(ord(str1[i])) | |
return rt |
def sub_url(self,str1): | |
import json | |
rv = str1 | |
try: | |
o = json.loads(str1) | |
changed = 0 | |
if isinstance(o,list): | |
for i,each in enumerate(o): | |
if each.has_key('text') and each.has_key('entities') and each['entities'].has_key('urls'): | |
text = each['text'] |
##f15 kde 桌面
###video music 加源 http://rpmfusion.org/Configuration yum -y install gstreamer-plugins-bad-free ffmpeg ffmpeg-devel lame 显卡安装失败
###install kernel
更新内核 : yum update kernel
大更新: yum update